本文整理汇总了Python中PyQt5.QtWidgets.QStackedWidget.setObjectName方法的典型用法代码示例。如果您正苦于以下问题:Python QStackedWidget.setObjectName方法的具体用法?Python QStackedWidget.setObjectName怎么用?Python QStackedWidget.setObjectName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PyQt5.QtWidgets.QStackedWidget
的用法示例。
在下文中一共展示了QStackedWidget.setObjectName方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: ConfigurationWidget
# 需要导入模块: from PyQt5.QtWidgets import QStackedWidget [as 别名]
# 或者: from PyQt5.QtWidgets.QStackedWidget import setObjectName [as 别名]
#.........这里部分代码省略.........
# set the initial size of the splitter
self.configSplitter.setSizes([200, 600])
self.configList.itemActivated.connect(self.__showConfigurationPage)
self.configList.itemClicked.connect(self.__showConfigurationPage)
self.buttonBox.accepted.connect(self.accept)
self.buttonBox.rejected.connect(self.rejected)
if displayMode in [ConfigurationWidget.HelpBrowserMode,
ConfigurationWidget.TrayStarterMode,
ConfigurationWidget.HexEditorMode]:
self.configListSearch.hide()
if displayMode not in [ConfigurationWidget.TrayStarterMode,
ConfigurationWidget.HexEditorMode]:
self.__initLexers()
def accept(self):
"""
Public slot to accept the buttonBox accept signal.
"""
if not isMacPlatform():
wdg = self.focusWidget()
if wdg == self.configList:
return
self.accepted.emit()
def __setupUi(self):
"""
Private method to perform the general setup of the configuration
widget.
"""
self.setObjectName("ConfigurationDialog")
self.resize(900, 650)
self.verticalLayout_2 = QVBoxLayout(self)
self.verticalLayout_2.setSpacing(6)
self.verticalLayout_2.setContentsMargins(6, 6, 6, 6)
self.verticalLayout_2.setObjectName("verticalLayout_2")
self.configSplitter = QSplitter(self)
self.configSplitter.setOrientation(Qt.Horizontal)
self.configSplitter.setObjectName("configSplitter")
self.configListWidget = QWidget(self.configSplitter)
self.leftVBoxLayout = QVBoxLayout(self.configListWidget)
self.leftVBoxLayout.setContentsMargins(0, 0, 0, 0)
self.leftVBoxLayout.setSpacing(0)
self.leftVBoxLayout.setObjectName("leftVBoxLayout")
self.configListSearch = E5ClearableLineEdit(
self, self.tr("Enter search text..."))
self.configListSearch.setObjectName("configListSearch")
self.leftVBoxLayout.addWidget(self.configListSearch)
self.configList = QTreeWidget()
self.configList.setObjectName("configList")
self.leftVBoxLayout.addWidget(self.configList)
self.configListSearch.textChanged.connect(self.__searchTextChanged)
self.scrollArea = QScrollArea(self.configSplitter)
self.scrollArea.setFrameShape(QFrame.NoFrame)
self.scrollArea.setVerticalScrollBarPolicy(Qt.ScrollBarAlwaysOn)
self.scrollArea.setHorizontalScrollBarPolicy(Qt.ScrollBarAlwaysOn)
self.scrollArea.setWidgetResizable(False)
self.scrollArea.setObjectName("scrollArea")
self.configStack = QStackedWidget()