本文整理汇总了Python中PyQt5.QtWidgets.QSplitter.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python QSplitter.__init__方法的具体用法?Python QSplitter.__init__怎么用?Python QSplitter.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PyQt5.QtWidgets.QSplitter
的用法示例。
在下文中一共展示了QSplitter.__init__方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from PyQt5.QtWidgets import QSplitter [as 别名]
# 或者: from PyQt5.QtWidgets.QSplitter import __init__ [as 别名]
def __init__(self, parent):
"""
Constructor
@param parent parent widget (QWidget)
"""
self.tabWidgets = []
QSplitter.__init__(self, parent)
ViewManager.__init__(self)
self.setChildrenCollapsible(False)
tw = TabWidget(self)
self.addWidget(tw)
self.tabWidgets.append(tw)
self.currentTabWidget = tw
self.currentTabWidget.showIndicator(True)
tw.currentChanged.connect(self.__currentChanged)
tw.installEventFilter(self)
tw.tabBar().installEventFilter(self)
self.setOrientation(Qt.Vertical)
self.__inRemoveView = False
self.maxFileNameChars = Preferences.getUI(
"TabViewManagerFilenameLength")
self.filenameOnly = Preferences.getUI("TabViewManagerFilenameOnly")
示例2: __init__
# 需要导入模块: from PyQt5.QtWidgets import QSplitter [as 别名]
# 或者: from PyQt5.QtWidgets.QSplitter import __init__ [as 别名]
def __init__(self, orientation=Qt.Vertical):
QSplitter.__init__(self, orientation)
self.pfile = None
self._hsplitter = QSplitter(Qt.Horizontal)
self.lateral_widget = lateral_widget.LateralWidget()
self._hsplitter.addWidget(self.lateral_widget)
self.table_widget = table_widget.TableWidget()
self._hsplitter.addWidget(self.table_widget)
self.addWidget(self._hsplitter)
self.query_container = query_container.QueryContainer(self)
self.addWidget(self.query_container)
self.modified = False
self.__nquery = 1
# Connections
# FIXME
self.lateral_widget.itemClicked.connect(
lambda: self.table_widget.stacked.setCurrentIndex(
self.lateral_widget.row()))
# For change table widget item when up/down
# see issue #39
self.lateral_widget.itemSelectionChanged.connect(
lambda: self.table_widget.stacked.setCurrentIndex(
self.lateral_widget.row()))
self.query_container.saveEditor['PyQt_PyObject'].connect(
self.save_query)
self.setSizes([1, 1])
示例3: __init__
# 需要导入模块: from PyQt5.QtWidgets import QSplitter [as 别名]
# 或者: from PyQt5.QtWidgets.QSplitter import __init__ [as 别名]
def __init__(self):
QSplitter.__init__(self)
self.setObjectName("main_container")
self.main_tab = tab_manager.TabManager()
self.secundary_tab = tab_manager.TabManager()
self.secundary_tab.hide()
self.tab = self.main_tab
self.addWidget(self.main_tab)
self.addWidget(self.secundary_tab)
Amaru.load_component("main_container", self)
self.fileChanged.connect(self._file_changed)
self.tab.currentChanged[int].connect(self._current_tab_changed)
self.tab.allTabsClosed.connect(self._all_tabs_closed)
示例4: __init__
# 需要导入模块: from PyQt5.QtWidgets import QSplitter [as 别名]
# 或者: from PyQt5.QtWidgets.QSplitter import __init__ [as 别名]
def __init__(self, parent):
"""
Constructor
@param parent parent widget (QWidget)
"""
self.stacks = []
QSplitter.__init__(self, parent)
ViewManager.__init__(self)
self.setChildrenCollapsible(False)
self.viewlist = QListWidget(self)
policy = self.viewlist.sizePolicy()
policy.setHorizontalPolicy(QSizePolicy.Ignored)
self.viewlist.setSizePolicy(policy)
self.addWidget(self.viewlist)
self.viewlist.setContextMenuPolicy(Qt.CustomContextMenu)
self.viewlist.currentRowChanged.connect(self.__showSelectedView)
self.viewlist.customContextMenuRequested.connect(self.__showMenu)
self.stackArea = QSplitter(self)
self.stackArea.setChildrenCollapsible(False)
self.addWidget(self.stackArea)
self.stackArea.setOrientation(Qt.Vertical)
stack = StackedWidget(self.stackArea)
self.stackArea.addWidget(stack)
self.stacks.append(stack)
self.currentStack = stack
stack.currentChanged.connect(self.__currentChanged)
stack.installEventFilter(self)
self.setSizes([int(self.width() * 0.2), int(self.width() * 0.8)])
# 20% for viewlist, 80% for the editors
self.__inRemoveView = False
self.__initMenu()
self.contextMenuEditor = None
self.contextMenuIndex = -1