本文整理汇总了Python中PyQt5.QtWidgets.QDockWidget.hide方法的典型用法代码示例。如果您正苦于以下问题:Python QDockWidget.hide方法的具体用法?Python QDockWidget.hide怎么用?Python QDockWidget.hide使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PyQt5.QtWidgets.QDockWidget
的用法示例。
在下文中一共展示了QDockWidget.hide方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: createDockWindows
# 需要导入模块: from PyQt5.QtWidgets import QDockWidget [as 别名]
# 或者: from PyQt5.QtWidgets.QDockWidget import hide [as 别名]
def createDockWindows(self):
dock = QDockWidget("Available Garments Types", self)
#dock.setAllowedAreas(Qt.LeftDockWidgetArea | Qt.RightDockWidgetArea)
self.availableItems = QListWidget(dock)
self.availableItems.setMinimumWidth(350)
self.availableItems.setMaximumWidth(350)
#self.availableItems.addItems(("stuff"))
self.availableItems.itemClicked.connect(self.itemClicked_Click)
dock.setWidget(self.availableItems)
self.addDockWidget(Qt.RightDockWidgetArea, dock)
self.viewMenu.addAction(dock.toggleViewAction())
dock.hide()
self.dock = QDockWidget("Available Garment Sizes", self)
self.orderItem = QTreeWidget(dock)
#self.orderItem.setMinimumWidth(350)
#self.orderItem.setMaximumWidth(350)
#self.orderItem.insertText(("more stuff"))
self.dock.setWidget(self.orderItem)
self.addDockWidget(Qt.RightDockWidgetArea, self.dock)
self.viewMenu.addAction(self.dock.toggleViewAction())
self.dock.hide()
#Create a tree widget for use when the t-shirt is clicked.
self.treeDock = QDockWidget("Order Items", self)
self.garmentTree = QTreeWidget(self.treeDock)
self.garmentTree.setObjectName('garmentTree')
self.garmentTree.itemClicked.connect(CSRWidgets.sumQuantity)
self.garmentTree.itemClicked.connect(lambda: CSRWidgets.updateNameDesign(self))
self.garmentTree.setMaximumWidth(480)
self.garmentTree.setMinimumWidth(480)
self.treeDock.hide()
示例2: new_docked
# 需要导入模块: from PyQt5.QtWidgets import QDockWidget [as 别名]
# 或者: from PyQt5.QtWidgets.QDockWidget import hide [as 别名]
def new_docked(self, widget, name, title, dock_area, hiden=False):
dock = QDockWidget()
dock.setWindowTitle(title)
dock.setWidget(widget)
if hiden:
dock.hide()
else:
dock.show()
self.main_window.addDockWidget(dock_area, dock)
self.modules_dock[name] = dock
return dock
示例3: MainWindow
# 需要导入模块: from PyQt5.QtWidgets import QDockWidget [as 别名]
# 或者: from PyQt5.QtWidgets.QDockWidget import hide [as 别名]
class MainWindow(QMainWindow, Ui_MainWindow):
def __init__(self):
super(MainWindow, self).__init__()
self.setupUi(self)
self.centralwidget.hide()
self.parser = argparse.ArgumentParser("playground")
self.parser.add_argument("-d", "--data-dir", type=str, help="data dir")
self.parser.add_argument("-a", "--console-address", type=str, help="console address", default='localhost')
self.parser.add_argument("-p", "--console-port", type=int, help="console port", default=2222)
self.args = self.parser.parse_args()
self.data_dir = self.args.data_dir
self.console_port = self.args.console_port
self.console_address = self.args.console_address
self.project = CetechProject()
self.api = QtConsoleAPI(self.console_address, self.console_port)
self.setTabPosition(Qt.AllDockWidgetAreas, QTabWidget.North)
self.script_editor_widget = ScriptEditor(project_manager=self.project, api=self.api)
self.script_editor_dock_widget = QDockWidget(self)
self.script_editor_dock_widget.setWindowTitle("Script editor")
self.script_editor_dock_widget.hide()
self.script_editor_dock_widget.setFeatures(QDockWidget.AllDockWidgetFeatures)
self.script_editor_dock_widget.setWidget(self.script_editor_widget)
self.addDockWidget(Qt.TopDockWidgetArea, self.script_editor_dock_widget)
self.log_widget = LogWidget(self.api, self.script_editor_widget)
self.log_dock_widget = QDockWidget(self)
self.log_dock_widget.hide()
self.log_dock_widget.setWindowTitle("Log")
self.log_dock_widget.setWidget(self.log_widget)
self.addDockWidget(Qt.BottomDockWidgetArea, self.log_dock_widget)
self.assetb_widget = AssetBrowser()
self.assetb_dock_widget = QDockWidget(self)
self.assetb_dock_widget.hide()
self.assetb_dock_widget.setWindowTitle("Asset browser")
self.assetb_dock_widget.setFeatures(QDockWidget.AllDockWidgetFeatures)
self.assetb_dock_widget.setWidget(self.assetb_widget)
self.addDockWidget(Qt.LeftDockWidgetArea, self.assetb_dock_widget)
self.recorded_event_widget = RecordEventWidget(api=self.api)
self.recorded_event_dock_widget = QDockWidget(self)
self.recorded_event_dock_widget.setWindowTitle("Recorded events")
self.recorded_event_dock_widget.hide()
self.recorded_event_dock_widget.setFeatures(QDockWidget.AllDockWidgetFeatures)
self.recorded_event_dock_widget.setWidget(self.recorded_event_widget)
self.addDockWidget(Qt.RightDockWidgetArea, self.recorded_event_dock_widget)
#TODO bug #114 workaround. Disable create sub engine...
if platform.system().lower() != 'darwin':
self.ogl_widget = CetechWidget(self, self.api)
self.ogl_dock = QDockWidget(self)
self.ogl_dock.hide()
self.ogl_dock.setWidget(self.ogl_widget)
self.addDockWidget(Qt.TopDockWidgetArea, self.ogl_dock)
self.tabifyDockWidget(self.assetb_dock_widget, self.log_dock_widget)
self.assetb_widget.asset_clicked.connect(self.open_asset)
self.file_watch = QFileSystemWatcher(self)
self.file_watch.fileChanged.connect(self.file_changed)
self.file_watch.directoryChanged.connect(self.dir_changed)
self.build_file_watch = QFileSystemWatcher(self)
self.build_file_watch.fileChanged.connect(self.build_file_changed)
self.build_file_watch.directoryChanged.connect(self.build_dir_changed)
def open_asset(self, path, ext):
if self.script_editor_widget.support_ext(ext):
self.script_editor_widget.open_file(path)
self.script_editor_dock_widget.show()
self.script_editor_dock_widget.focusWidget()
def open_project(self, name, dir):
self.project.open_project(name, dir)
# self.project.run_cetech(build_type=CetechProject.BUILD_DEBUG, compile=True, continu=True, daemon=True)
if platform.system().lower() == 'darwin':
wid = None
else:
wid = self.ogl_widget.winId()
self.project.run_cetech(build_type=CetechProject.BUILD_DEBUG, compile_=True, continue_=True,
wid=wid)
self.api.start(QThread.LowPriority)
self.assetb_widget.open_project(self.project.project_dir)
self.assetb_dock_widget.show()
self.log_dock_widget.show()
#.........这里部分代码省略.........
示例4: MainWindow
# 需要导入模块: from PyQt5.QtWidgets import QDockWidget [as 别名]
# 或者: from PyQt5.QtWidgets.QDockWidget import hide [as 别名]
#.........这里部分代码省略.........
self.lblVar2 = QLabel()
self.lblVar2.setFont(QFont('Veranda', 14, QFont.Bold))
self.lblVar2.setMargin(10)
self.lblTxtVar2 = QLabel()
self.lblTxtVar2.setFont(QFont('Veranda', 14, QFont.Bold))
self.lblTxtVar2.setMargin(0)
self.lblSkuName = QLabel()
self.lblSkuName.setFont(QFont('Veranda', 14, QFont.Bold))
self.lblSkuName.setMargin(10)
self.searchToolBar.addWidget(btnNameChange)
self.searchToolBar.addWidget(self.lblVar1)
self.searchToolBar.addWidget(self.lblTxtVar1)
self.searchToolBar.addWidget(self.lblVar2)
self.searchToolBar.addWidget(self.lblTxtVar2)
self.searchToolBar.addWidget(self.lblSkuName)
def createStatusBar(self):
self.statusBar().showMessage("Ready")
def createDockWindows(self):
dock = QDockWidget("Available Garments Types", self)
#dock.setAllowedAreas(Qt.LeftDockWidgetArea | Qt.RightDockWidgetArea)
self.availableItems = QListWidget(dock)
self.availableItems.setMinimumWidth(350)
self.availableItems.setMaximumWidth(350)
#self.availableItems.addItems(("stuff"))
self.availableItems.itemClicked.connect(self.itemClicked_Click)
dock.setWidget(self.availableItems)
self.addDockWidget(Qt.RightDockWidgetArea, dock)
self.viewMenu.addAction(dock.toggleViewAction())
dock.hide()
self.dock = QDockWidget("Available Garment Sizes", self)
self.orderItem = QTreeWidget(dock)
#self.orderItem.setMinimumWidth(350)
#self.orderItem.setMaximumWidth(350)
#self.orderItem.insertText(("more stuff"))
self.dock.setWidget(self.orderItem)
self.addDockWidget(Qt.RightDockWidgetArea, self.dock)
self.viewMenu.addAction(self.dock.toggleViewAction())
self.dock.hide()
#Create a tree widget for use when the t-shirt is clicked.
self.treeDock = QDockWidget("Order Items", self)
self.garmentTree = QTreeWidget(self.treeDock)
self.garmentTree.setObjectName('garmentTree')
self.garmentTree.itemClicked.connect(CSRWidgets.sumQuantity)
self.garmentTree.itemClicked.connect(lambda: CSRWidgets.updateNameDesign(self))
self.garmentTree.setMaximumWidth(480)
self.garmentTree.setMinimumWidth(480)
self.treeDock.hide()
def btnSale_Click(self):
btnName = self.sender()
sku_code = str(btnName.objectName())
# #print(sku_code)
# sv = mysql_db.getSecondVar(self, sku_code)
# if self.var1 == "":
# CSRWidgets.getCustomerName(self, sku_code)
# elif self.var1 != "" and not self.var2:
# sv = mysql_db.getSecondVar(self, sku_code)