本文整理汇总了Python中PyQt5.QtWidgets.QDockWidget.setMaximumHeight方法的典型用法代码示例。如果您正苦于以下问题:Python QDockWidget.setMaximumHeight方法的具体用法?Python QDockWidget.setMaximumHeight怎么用?Python QDockWidget.setMaximumHeight使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PyQt5.QtWidgets.QDockWidget
的用法示例。
在下文中一共展示了QDockWidget.setMaximumHeight方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: MainForm
# 需要导入模块: from PyQt5.QtWidgets import QDockWidget [as 别名]
# 或者: from PyQt5.QtWidgets.QDockWidget import setMaximumHeight [as 别名]
class MainForm(QMainWindow):
areas = []
toolBoxs = []
tab = 0
ui_ = None
debugLevel = 100
mPAreas = {} # Almacena los nombre de submenus areas de menú pineboo
mPModulos = {} # Almacena los nombre de submenus modulos de menú pineboo
openTabs = []
favoritosW = None
wid = None # widget principal
def __init__(self, parent=None):
super(MainForm, self).__init__(parent)
self.ui_ = None
@classmethod
def setDebugLevel(self, q):
MainForm.debugLevel = q
def load(self):
self.ui_ = pineboolib.project.conn.managerModules().createUI(
filedir('plugins/mainform/pineboo/mainform.ui'), None, self)
self.w_ = self
frameGm = self.frameGeometry()
screen = QApplication.desktop().screenNumber(
QApplication.desktop().cursor().pos())
centerPoint = QApplication.desktop().screenGeometry(screen).center()
frameGm.moveCenter(centerPoint)
self.move(frameGm.topLeft())
self.areasTab = QTabWidget()
self.areasTab.setTabPosition(QTabWidget.West)
self.formTab = QTabWidget()
try:
self.areasTab.removeItem = self.areasTab.removeTab
self.areasTab.addItem = self.areasTab.addTab
except Exception:
pass
self.dockAreasTab = QDockWidget()
self.dockAreasTab.setWindowTitle("Módulos")
#self.dockAreas = QtWidgets.QDockWidget()
self.dockFavoritos = QDockWidget()
self.dockFavoritos.setWindowTitle("Favoritos")
self.dockForm = QDockWidget()
self.dockConsole = None
self.dockAreasTab.setWidget(self.areasTab)
self.dockAreasTab.setMaximumWidth(400)
self.dockFavoritos.setMaximumWidth(400)
self.dockFavoritos.setMaximumHeight(500)
# self.dockAreasTab.setMinimumWidth(400)
# self.dockAreasTab.setMaximumHeight(500)
self.dockForm.setWidget(self.formTab)
self.addDockWidget(Qt.RightDockWidgetArea, self.dockForm)
# self.dockForm.setMaximumWidth(950)
self.addDockWidget(Qt.LeftDockWidgetArea, self.dockFavoritos)
self.addDockWidget(Qt.LeftDockWidgetArea, self.dockAreasTab)
# self.dockAreasTab.show()
# self.dockForm.show()
# self.areasTab.removeItem(0) #Borramos tab de ejemplo.
self.formTab.setTabsClosable(True)
self.setAttribute(QtCore.Qt.WA_DeleteOnClose)
self.formTab.tabCloseRequested[int].connect(self.closeFormTab)
self.formTab.removeTab(0)
#app_icon = QtGui.QIcon('share/icons/pineboo-logo-16.png')
# app_icon.addFile(filedir('share/icons/pineboo-logo-16.png'),
# QtCore.QSize(16, 16))
# app_icon.addFile(filedir('share/icons/pineboo-logo-24.png'),
# QtCore.QSize(24, 24))
# app_icon.addFile(filedir('share/icons/pineboo-logo-32.png'),
# QtCore.QSize(32, 32))
# app_icon.addFile(filedir('share/icons/pineboo-logo-48.png'),
# QtCore.QSize(48, 48))
# app_icon.addFile(filedir('share/icons/pineboo-logo-64.png'),
# QtCore.QSize(64, 64))
# app_icon.addFile(filedir('share/icons/pineboo-logo-128.png'),
# QtCore.QSize(128, 128))
# app_icon.addFile(filedir('share/icons/pineboo-logo-256.png'),
# QtCore.QSize(256, 256))
# self.setWindowIcon(app_icon)
self.setWindowIcon(QtGui.QIcon('share/icons/pineboo-logo-16.png'))
self.actionAcercaQt.triggered.connect(pineboolib.project.aboutQt)
self.actionAcercaPineboo.triggered.connect(pineboolib.project.aboutPineboo)
self.actionFavoritos.triggered.connect(self.changeStateDockFavoritos)
self.dockFavoritos.visibilityChanged.connect(self.changeStateActionFavoritos)
self.actionModulos.triggered.connect(self.changeStateDockAreas)
self.dockAreasTab.visibilityChanged.connect(self.changeStateActionAreas)
self.actionTipografia.triggered.connect(pineboolib.project.chooseFont)
self.menuPineboo.addSeparator()
# self.actionEstilo.triggered.connect(pineboolib.main.styleDialog)
#.........这里部分代码省略.........