本文整理汇总了Python中AnyQt.QtWidgets.QDialog.show方法的典型用法代码示例。如果您正苦于以下问题:Python QDialog.show方法的具体用法?Python QDialog.show怎么用?Python QDialog.show使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AnyQt.QtWidgets.QDialog
的用法示例。
在下文中一共展示了QDialog.show方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_escape_hides
# 需要导入模块: from AnyQt.QtWidgets import QDialog [as 别名]
# 或者: from AnyQt.QtWidgets.QDialog import show [as 别名]
def test_escape_hides(self):
window = QDialog()
w = WebviewWidget(window)
window.show()
w.setFocus(Qt.OtherFocusReason)
self.assertFalse(window.isHidden())
QTest.keyClick(w, Qt.Key_Escape)
self.assertTrue(window.isHidden())
示例2: ShowInfo
# 需要导入模块: from AnyQt.QtWidgets import QDialog [as 别名]
# 或者: from AnyQt.QtWidgets.QDialog import show [as 别名]
def ShowInfo(self):
dialog = QDialog(self)
dialog.setModal(False)
dialog.setLayout(QVBoxLayout())
label = QLabel(dialog)
label.setText("Ontology:\n" + self.ontology.header
if self.ontology else "Ontology not loaded!")
dialog.layout().addWidget(label)
label = QLabel(dialog)
label.setText("Annotations:\n" + self.annotations.header.replace("!", "")
if self.annotations else "Annotations not loaded!")
dialog.layout().addWidget(label)
dialog.show()
示例3: QDialog
# 需要导入模块: from AnyQt.QtWidgets import QDialog [as 别名]
# 或者: from AnyQt.QtWidgets.QDialog import show [as 别名]
win = QDialog()
grid = QGridLayout(win)
win.setLayout(grid)
kwargs = dict(
minimum=0,
maximum=100,
tickInterval=5,
minimumValue=20,
maximumValue=80,
slidersMoved=print
)
grid.addWidget(QLabel('RangeSlider:', win), 0, 0)
grid.addWidget(RangeSlider(win, orientation=Qt.Horizontal, **kwargs), 0, 1)
grid.addWidget(QLabel('RangeSlider:', win), 1, 0)
grid.addWidget(RangeSlider(win, orientation=Qt.Vertical, **kwargs), 1, 1)
grid.addWidget(QLabel('ViolinSlider:', win), 2, 0)
slider = ViolinSlider(win, orientation=Qt.Horizontal, **kwargs)
from Orange.data import Table
data = Table('iris')
values = data.X[:, 0]
slider.setHistogram(values)
grid.addWidget(slider, 2, 1)
grid.addWidget(QLabel('ViolinSlider:', win), 3, 0)
grid.addWidget(ViolinSlider(win, orientation=Qt.Vertical, **kwargs), 3, 1)
win.show()
app.exec()