本文整理汇总了Python中PySide.QtGui.QDialog.combo方法的典型用法代码示例。如果您正苦于以下问题:Python QDialog.combo方法的具体用法?Python QDialog.combo怎么用?Python QDialog.combo使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PySide.QtGui.QDialog
的用法示例。
在下文中一共展示了QDialog.combo方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: settings
# 需要导入模块: from PySide.QtGui import QDialog [as 别名]
# 或者: from PySide.QtGui.QDialog import combo [as 别名]
def settings(self):
if self.settings_window is None:
window = QDialog(self)
self.settings_window = window
else: window = self.settings_window
window = self.settings_window
window.setWindowTitle('Settings')
window.notelabel = QLabel("Currently these settings are only guaranteed to work prior to loading the first MIDI!\nYou'll have to restart ADLMIDI pyGui to change them again if they stop working. \n\nSorry! This will be fixed soon!")
window.notelabel.setWordWrap(True)
window.notelabel.setStyleSheet("font-size: 8pt; border-style: dotted; border-width: 1px; padding: 12px;")
window.banklabel = QLabel("<B>Choose Instrument Bank</B>")
window.space = QLabel("")
window.optlabel = QLabel("<B>Options</B>")
window.combo = QComboBox()
window.combo.addItems(self.banks)
#window.combo.setMaximumWidth(350)
window.combo.setMaxVisibleItems(12)
window.combo.setStyleSheet("combobox-popup: 0;")
window.combo.setCurrentIndex(int(self.progset.value("sound/bank", 1)))
window.combo.currentIndexChanged.connect(self.saveSettings)
window.perc = QCheckBox("Adlib Percussion Instrument Mode")
#window.perc.stateChanged.connect(self.checkOpts)
window.tremamp = QCheckBox("Tremolo Amplification Mode")
#window.tremamp.stateChanged.connect(self.checkOpts)
window.vibamp = QCheckBox("Vibrato Amplification Mode")
#window.vibamp.stateChanged.connect(self.checkOpts)
window.modscale = QCheckBox("Scaling of Modulator Volume")
#window.modscale.stateChanged.connect(self.checkOpts)
window.okButton = QPushButton('OK')
window.okButton.clicked.connect(window.hide)
vbox = QVBoxLayout()
vbox.addWidget(window.space)
vbox.addWidget(window.banklabel)
vbox.addWidget(window.combo)
vbox.addWidget(window.space)
vbox.addWidget(window.optlabel)
vbox.addWidget(window.perc)
vbox.addWidget(window.tremamp)
vbox.addWidget(window.vibamp)
vbox.addWidget(window.modscale)
vbox.addWidget(window.notelabel)
hbox = QHBoxLayout()
hbox.addStretch(1)
hbox.addWidget(window.okButton)
vbox.addLayout(hbox)
window.setLayout(vbox)
window.setFixedSize(530, 369)
window.show()
window.activateWindow()
window.raise_()