本文整理汇总了Python中PySide.QtGui.QCheckBox.setStyleSheet方法的典型用法代码示例。如果您正苦于以下问题:Python QCheckBox.setStyleSheet方法的具体用法?Python QCheckBox.setStyleSheet怎么用?Python QCheckBox.setStyleSheet使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PySide.QtGui.QCheckBox
的用法示例。
在下文中一共展示了QCheckBox.setStyleSheet方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: ConfigDialog
# 需要导入模块: from PySide.QtGui import QCheckBox [as 别名]
# 或者: from PySide.QtGui.QCheckBox import setStyleSheet [as 别名]
#.........这里部分代码省略.........
self.executablepathCombobox.editTextChanged.connect(self.updateExecutableIcon)
self.executablepathLabel = QLabel(getMessage("executable-path-label"), self)
self.executablebrowseButton = QtGui.QPushButton(QtGui.QIcon(resourcespath + 'folder_explore.png'), getMessage("browse-label"))
self.executablebrowseButton.clicked.connect(self.browsePlayerpath)
self.mediapathTextbox = QLineEdit(config['file'], self)
self.mediapathLabel = QLabel(getMessage("media-path-label"), self)
self.mediabrowseButton = QtGui.QPushButton(QtGui.QIcon(resourcespath + 'folder_explore.png'), getMessage("browse-label"))
self.mediabrowseButton.clicked.connect(self.browseMediapath)
self.executablepathLabel.setObjectName("executable-path")
self.executablepathCombobox.setObjectName("executable-path")
self.mediapathLabel.setObjectName("media-path")
self.mediapathTextbox.setObjectName(constants.LOAD_SAVE_MANUALLY_MARKER + "media-path")
self.mediaplayerSettingsLayout = QtGui.QGridLayout()
self.mediaplayerSettingsLayout.addWidget(self.executablepathLabel, 0, 0)
self.mediaplayerSettingsLayout.addWidget(self.executableiconLabel, 0, 1)
self.mediaplayerSettingsLayout.addWidget(self.executablepathCombobox, 0, 2)
self.mediaplayerSettingsLayout.addWidget(self.executablebrowseButton, 0, 3)
self.mediaplayerSettingsLayout.addWidget(self.mediapathLabel, 1, 0)
self.mediaplayerSettingsLayout.addWidget(self.mediapathTextbox , 1, 2)
self.mediaplayerSettingsLayout.addWidget(self.mediabrowseButton , 1, 3)
self.mediaplayerSettingsGroup.setLayout(self.mediaplayerSettingsLayout)
self.showmoreCheckbox = QCheckBox(getMessage("more-title"))
self.showmoreCheckbox.setObjectName(constants.LOAD_SAVE_MANUALLY_MARKER + "more")
self.basicOptionsFrame = QtGui.QFrame()
self.basicOptionsLayout = QtGui.QVBoxLayout()
if error:
self.errorLabel = QLabel(self)
if error[:1] != constants.ERROR_MESSAGE_MARKER:
self.errorLabel.setStyleSheet(constants.STYLE_ERRORLABEL)
else:
error = error[1:]
self.errorLabel.setStyleSheet(constants.STYLE_SUCCESSLABEL)
self.errorLabel.setText(error)
self.errorLabel.setAlignment(Qt.AlignCenter)
self.basicOptionsLayout.addWidget(self.errorLabel, 0, 0)
self.basicOptionsLayout.addWidget(self.connectionSettingsGroup)
self.basicOptionsLayout.addSpacing(12)
self.basicOptionsLayout.addWidget(self.mediaplayerSettingsGroup)
self.basicOptionsFrame.setLayout(self.basicOptionsLayout)
self.stackedLayout.addWidget(self.basicOptionsFrame)
def addSyncTab(self):
self.syncSettingsFrame = QtGui.QFrame()
self.syncSettingsLayout = QtGui.QVBoxLayout()
self.desyncSettingsGroup = QtGui.QGroupBox("If others are lagging behind...")
self.desyncOptionsFrame = QtGui.QFrame()
self.desyncSettingsOptionsLayout = QtGui.QHBoxLayout()
config = self.config
self.slowdownCheckbox = QCheckBox(getMessage("slowondesync-label"))
self.slowdownCheckbox.setObjectName("slowOnDesync")
self.rewindCheckbox = QCheckBox(getMessage("rewindondesync-label"))
self.rewindCheckbox.setObjectName("rewindOnDesync")
self.spaceLabel = QLabel()
self.spaceLabel.setFixedHeight(5)
self.desyncSettingsLayout = QtGui.QGridLayout()
示例2: ConfigDialog
# 需要导入模块: from PySide.QtGui import QCheckBox [as 别名]
# 或者: from PySide.QtGui.QCheckBox import setStyleSheet [as 别名]
#.........这里部分代码省略.........
self.executablepathCombobox.editTextChanged.connect(self.updateExecutableIcon)
self.executablepathLabel = QLabel(getMessage("executable-path-label"), self)
self.executablebrowseButton = QtGui.QPushButton(QtGui.QIcon(resourcespath + 'folder_explore.png'), getMessage("browse-label"))
self.executablebrowseButton.clicked.connect(self.browsePlayerpath)
self.mediapathTextbox = QLineEdit(config['file'], self)
self.mediapathLabel = QLabel(getMessage("media-path-label"), self)
self.mediabrowseButton = QtGui.QPushButton(QtGui.QIcon(resourcespath + 'folder_explore.png'), getMessage("browse-label"))
self.mediabrowseButton.clicked.connect(self.browseMediapath)
self.executablepathLabel.setObjectName("executable-path")
self.executablepathCombobox.setObjectName("executable-path")
self.mediapathLabel.setObjectName("media-path")
self.mediapathTextbox.setObjectName(constants.LOAD_SAVE_MANUALLY_MARKER + "media-path")
self.mediaplayerSettingsLayout = QtGui.QGridLayout()
self.mediaplayerSettingsLayout.addWidget(self.executablepathLabel, 0, 0)
self.mediaplayerSettingsLayout.addWidget(self.executableiconLabel, 0, 1)
self.mediaplayerSettingsLayout.addWidget(self.executablepathCombobox, 0, 2)
self.mediaplayerSettingsLayout.addWidget(self.executablebrowseButton, 0, 3)
self.mediaplayerSettingsLayout.addWidget(self.mediapathLabel, 1, 0)
self.mediaplayerSettingsLayout.addWidget(self.mediapathTextbox , 1, 2)
self.mediaplayerSettingsLayout.addWidget(self.mediabrowseButton , 1, 3)
self.mediaplayerSettingsGroup.setLayout(self.mediaplayerSettingsLayout)
self.showmoreCheckbox = QCheckBox(getMessage("more-title"))
self.showmoreCheckbox.setObjectName(constants.LOAD_SAVE_MANUALLY_MARKER + "more")
self.basicOptionsFrame = QtGui.QFrame()
self.basicOptionsLayout = QtGui.QVBoxLayout()
if error:
self.errorLabel = QLabel(self)
if error[:1] != constants.ERROR_MESSAGE_MARKER:
self.errorLabel.setStyleSheet(constants.STYLE_ERRORLABEL)
else:
error = error[1:]
self.errorLabel.setStyleSheet(constants.STYLE_SUCCESSLABEL)
self.errorLabel.setText(error)
self.errorLabel.setAlignment(Qt.AlignCenter)
self.basicOptionsLayout.addWidget(self.errorLabel, 0, 0)
self.connectionSettingsGroup.setMaximumHeight(self.connectionSettingsGroup.minimumSizeHint().height())
self.basicOptionsLayout.setAlignment(Qt.AlignTop)
self.basicOptionsLayout.addWidget(self.connectionSettingsGroup)
self.basicOptionsLayout.addSpacing(5)
self.mediaplayerSettingsGroup.setMaximumHeight(self.mediaplayerSettingsGroup.minimumSizeHint().height())
self.basicOptionsLayout.addWidget(self.mediaplayerSettingsGroup)
self.basicOptionsFrame.setLayout(self.basicOptionsLayout)
self.stackedLayout.addWidget(self.basicOptionsFrame)
def addReadinessTab(self):
self.readyFrame = QtGui.QFrame()
self.readyLayout = QtGui.QVBoxLayout()
self.readyFrame.setLayout(self.readyLayout)
# Initial state
self.readyInitialGroup = QtGui.QGroupBox(u"Initial readiness state")
self.readyInitialLayout = QtGui.QVBoxLayout()
self.readyInitialGroup.setLayout(self.readyInitialLayout)
self.readyatstartCheckbox = QCheckBox(getMessage("readyatstart-label"))
self.readyatstartCheckbox.setObjectName("readyAtStart")
self.readyInitialLayout.addWidget(self.readyatstartCheckbox)
self.readyLayout.addWidget(self.readyInitialGroup)