本文整理汇总了Python中PyQt4.QtGui.QGroupBox.setMinimumSize方法的典型用法代码示例。如果您正苦于以下问题:Python QGroupBox.setMinimumSize方法的具体用法?Python QGroupBox.setMinimumSize怎么用?Python QGroupBox.setMinimumSize使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PyQt4.QtGui.QGroupBox
的用法示例。
在下文中一共展示了QGroupBox.setMinimumSize方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: Mplayer
# 需要导入模块: from PyQt4.QtGui import QGroupBox [as 别名]
# 或者: from PyQt4.QtGui.QGroupBox import setMinimumSize [as 别名]
#.........这里部分代码省略.........
self.bout_suivant.setIconSize(QSize(iconTaille, iconTaille))
self.bout_suivant.setFlat(flat)
self.LISTW=False
if Mplayer.LIST in choixWidget :
self.LISTW = True
self.listFichiers = QComboBox()
self.listFichiers.hide()
self.setListeVideo()
self.bout_LectPause = QPushButton(self.icone_lire,"")
self.bout_LectPause.setIconSize(QSize(iconTaille, iconTaille))
self.bout_LectPause.setFlat(flat)
self.bout_Arret = QPushButton(self.icone_arret,"")
self.bout_Arret.setIconSize(QSize(iconTaille, iconTaille))
self.bout_Arret.setFlat(flat)
# widget qui contiendra la vidéo
self.cibleVideo = DisplayVid(self)
# par défaut le widget-cible est noir
color = QColor(0, 0, 0)
self.cibleVideo.setAutoFillBackground(True)
self.cibleVideo.setPalette(QPalette(color))
self.cibleVideo.setSizePolicy(QSizePolicy.Expanding, QSizePolicy.Fixed)
self.cibleVideo.setFixedHeight(self.taille[1])
self.cibleVideo.setToolTip(self.fichierCourant[0])
#Choix de l'aspect ratio de la vidéo
if Mplayer.RATIO in choixWidget :
self.conf = QGroupBox()
self.conf.setContentsMargins(0,0,0,0)
self.conf.setMinimumSize(QSize(self.tailleLargeur, 0))
self.conf.setObjectName("conf")
self.verticalLayout = QHBoxLayout(self.conf)
self.verticalLayout.setObjectName("verticalLayout")
self.choicenorm = QRadioButton(self.conf)
self.choicenorm.setObjectName("choicenorm")
self.verticalLayout.addWidget(self.choicenorm)
self.choicewide = QRadioButton(self.conf)
self.choicewide.setObjectName("choicewide")
self.verticalLayout.addWidget(self.choicewide)
self.choiceone = QRadioButton(self.conf)
self.choiceone.setObjectName("choiceone")
self.verticalLayout.addWidget(self.choiceone)
self.choicenorm.setText("4:3")
self.choicewide.setText("16:9")
self.choiceone.setText("w:h")
# Checked le ratio de la vidéo
if self.listeVideos.__len__()!=0:
self.changeRatio(self.listeVideos[0])
else :
self.setRatio(4.0/3.0)
if Mplayer.RATIO in choixWidget :
self.choicenorm.setChecked(True)
self.slider = QSlider(Qt.Horizontal)
self.slider.setEnabled(True)
self.mplayerProcess = QProcess(self)
self.timer = QTimer(self)
self.tempsChrono = TracerChrono()
示例2: runInputDialog
# 需要导入模块: from PyQt4.QtGui import QGroupBox [as 别名]
# 或者: from PyQt4.QtGui.QGroupBox import setMinimumSize [as 别名]
def runInputDialog(self, title, c1Text, c2Text, opText,
outText, cell1, cell2, outCell):
rows = []
cols = []
for r in range(self.table.rowCount()):
rows.append(str(r + 1))
for c in range(self.table.columnCount()):
cols.append(chr(ord('A') + c))
addDialog = QDialog(self)
addDialog.setWindowTitle(title)
group = QGroupBox(title, addDialog)
group.setMinimumSize(250, 100)
cell1Label = QLabel(c1Text, group)
cell1RowInput = QComboBox(group)
c1Row, c1Col = decode_pos(cell1)
cell1RowInput.addItems(rows)
cell1RowInput.setCurrentIndex(c1Row)
cell1ColInput = QComboBox(group)
cell1ColInput.addItems(cols)
cell1ColInput.setCurrentIndex(c1Col)
operatorLabel = QLabel(opText, group)
operatorLabel.setAlignment(Qt.AlignHCenter)
cell2Label = QLabel(c2Text, group)
cell2RowInput = QComboBox(group)
c2Row, c2Col = decode_pos(cell2)
cell2RowInput.addItems(rows)
cell2RowInput.setCurrentIndex(c2Row)
cell2ColInput = QComboBox(group)
cell2ColInput.addItems(cols)
cell2ColInput.setCurrentIndex(c2Col)
equalsLabel = QLabel("=", group)
equalsLabel.setAlignment(Qt.AlignHCenter)
outLabel = QLabel(outText, group)
outRowInput = QComboBox(group)
outRow, outCol = decode_pos(outCell)
outRowInput.addItems(rows)
outRowInput.setCurrentIndex(outRow)
outColInput = QComboBox(group)
outColInput.addItems(cols)
outColInput.setCurrentIndex(outCol)
cancelButton = QPushButton("Cancel", addDialog)
cancelButton.clicked.connect(addDialog.reject)
okButton = QPushButton("OK", addDialog)
okButton.setDefault(True)
okButton.clicked.connect(addDialog.accept)
buttonsLayout = QHBoxLayout()
buttonsLayout.addStretch(1)
buttonsLayout.addWidget(okButton)
buttonsLayout.addSpacing(10)
buttonsLayout.addWidget(cancelButton)
dialogLayout = QVBoxLayout(addDialog)
dialogLayout.addWidget(group)
dialogLayout.addStretch(1)
dialogLayout.addItem(buttonsLayout)
cell1Layout = QHBoxLayout()
cell1Layout.addWidget(cell1Label)
cell1Layout.addSpacing(10)
cell1Layout.addWidget(cell1ColInput)
cell1Layout.addSpacing(10)
cell1Layout.addWidget(cell1RowInput)
cell2Layout = QHBoxLayout()
cell2Layout.addWidget(cell2Label)
cell2Layout.addSpacing(10)
cell2Layout.addWidget(cell2ColInput)
cell2Layout.addSpacing(10)
cell2Layout.addWidget(cell2RowInput)
outLayout = QHBoxLayout()
outLayout.addWidget(outLabel)
outLayout.addSpacing(10)
outLayout.addWidget(outColInput)
outLayout.addSpacing(10)
outLayout.addWidget(outRowInput)
vLayout = QVBoxLayout(group)
vLayout.addItem(cell1Layout)
vLayout.addWidget(operatorLabel)
vLayout.addItem(cell2Layout)
vLayout.addWidget(equalsLabel)
vLayout.addStretch(1)
vLayout.addItem(outLayout)
if addDialog.exec_():
cell1 = cell1ColInput.currentText() + cell1RowInput.currentText()
cell2 = cell2ColInput.currentText() + cell2RowInput.currentText()
outCell = outColInput.currentText() + outRowInput.currentText()
return True, cell1, cell2, outCell
return False, None, None, None