本文整理汇总了Python中qt.QWidget.show方法的典型用法代码示例。如果您正苦于以下问题:Python QWidget.show方法的具体用法?Python QWidget.show怎么用?Python QWidget.show使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类qt.QWidget
的用法示例。
在下文中一共展示了QWidget.show方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: show
# 需要导入模块: from qt import QWidget [as 别名]
# 或者: from qt.QWidget import show [as 别名]
def show(self):
"""prepare the view and show it"""
if self.client.hasLocalServer():
title = m18n(
'Local Games with Ruleset %1',
self.client.ruleset.name)
else:
title = m18n('Tables at %1', self.client.connection.url)
decorateWindow(self, ' - '.join([self.client.name, title]))
self.view.hideColumn(1)
tableCount = self.view.model().rowCount(
None) if self.view.model() else 0
self.view.showColumn(0)
self.view.showColumn(2)
self.view.showColumn(4)
if tableCount or not self.client.hasLocalServer():
QWidget.show(self)
if self.client.hasLocalServer():
self.view.hideColumn(0)
self.view.hideColumn(2)
self.view.hideColumn(4)
示例2: show
# 需要导入模块: from qt import QWidget [as 别名]
# 或者: from qt.QWidget import show [as 别名]
def show(self):
"""not only show but also restore and raise"""
self.activateWindow()
self.setWindowState(self.windowState() & ~Qt.WindowMinimized)
self.raise_()
QWidget.show(self)
示例3: __init__
# 需要导入模块: from qt import QWidget [as 别名]
# 或者: from qt.QWidget import show [as 别名]
class qSlicerMultiVolumeExplorerSimplifiedModuleWidget:
def __init__(self, parent=None):
logging.debug("qSlicerMultiVolumeExplorerSimplifiedModuleWidget:init() called")
if not parent or not hasattr(parent, "layout"):
self.parent = slicer.qMRMLWidget()
self.parent.setLayout(QVBoxLayout())
else:
self.parent = parent
self.layout = self.parent.layout()
self._bgMultiVolumeNode = None
self._fgMultiVolumeNode = None
self.styleObserverTags = []
self.sliceWidgetsPerStyle = {}
self.chartPopupWindow = None
self.chartPopupSize = QSize(600, 300)
self.chartPopupPosition = QPoint(0,0)
def hide(self):
self.widget.hide()
def show(self):
self.widget.show()
def setup(self):
self.widget = QWidget()
layout = QGridLayout()
self.widget.setLayout(layout)
self.layout.addWidget(self.widget)
self.widget.show()
self.layout = layout
self.setupInputFrame()
self.setupFrameControlFrame()
self.setupAdditionalFrames()
self.setupPlottingFrame()
self.setFramesEnabled(False)
self.timer = QTimer()
self.timer.setInterval(50)
self.setupConnections()
# initialize slice observers (from DataProbe.py)
# keep list of pairs: [observee,tag] so they can be removed easily
self.styleObserverTags = []
# keep a map of interactor styles to sliceWidgets so we can easily get sliceLogic
self.sliceWidgetsPerStyle = {}
self.refreshObservers()
def setupInputFrame(self, parent=None):
if not parent:
parent = self.layout
self.bgMultiVolumeSelector = slicer.qMRMLNodeComboBox()
self.bgMultiVolumeSelector.nodeTypes = ['vtkMRMLMultiVolumeNode']
self.bgMultiVolumeSelector.setMRMLScene(slicer.mrmlScene)
self.bgMultiVolumeSelector.addEnabled = 0
self._bgMultiVolumeSelectorLabel = QLabel('Input multivolume')
inputFrameWidget = QWidget()
self.inputFrameLayout = QFormLayout()
inputFrameWidget.setLayout(self.inputFrameLayout)
self.inputFrameLayout.addRow(self._bgMultiVolumeSelectorLabel, self.bgMultiVolumeSelector)
parent.addWidget(inputFrameWidget)
def setupFrameControlFrame(self):
# TODO: initialize the slider based on the contents of the labels array
self.frameSlider = ctk.ctkSliderWidget()
self.frameLabel = QLabel('Current frame number')
self.playButton = QPushButton('Play')
self.playButton.toolTip = 'Iterate over multivolume frames'
self.playButton.checkable = True
frameControlHBox = QHBoxLayout()
frameControlHBox.addWidget(self.frameLabel)
frameControlHBox.addWidget(self.frameSlider)
frameControlHBox.addWidget(self.playButton)
self.inputFrameLayout.addRow(frameControlHBox)
def setupAdditionalFrames(self):
pass
def setupPlottingFrame(self, parent=None):
if not parent:
parent = self.layout
self.plottingFrameWidget = QWidget()
self.plottingFrameLayout = QGridLayout()
self.plottingFrameWidget.setLayout(self.plottingFrameLayout)
self._multiVolumeIntensityChart = MultiVolumeIntensityChartView()
self.popupChartButton = QPushButton("Undock chart")
self.popupChartButton.setCheckable(True)
self.plottingFrameLayout.addWidget(self._multiVolumeIntensityChart.chartView)
self.plottingFrameLayout.addWidget(self.popupChartButton)
parent.addWidget(self.plottingFrameWidget)
def setupConnections(self):
self.parent.connect('mrmlSceneChanged(vtkMRMLScene*)', self.onVCMRMLSceneChanged)
#.........这里部分代码省略.........
示例4: show
# 需要导入模块: from qt import QWidget [as 别名]
# 或者: from qt.QWidget import show [as 别名]
def show(self):
"""only now compute content"""
if self.game and not self.game.finished():
self.slotInputChanged()
QWidget.show(self)