本文整理汇总了Python中PyQt4.QtGui.QBoxLayout.minimumSize方法的典型用法代码示例。如果您正苦于以下问题:Python QBoxLayout.minimumSize方法的具体用法?Python QBoxLayout.minimumSize怎么用?Python QBoxLayout.minimumSize使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PyQt4.QtGui.QBoxLayout
的用法示例。
在下文中一共展示了QBoxLayout.minimumSize方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: E4SideBar
# 需要导入模块: from PyQt4.QtGui import QBoxLayout [as 别名]
# 或者: from PyQt4.QtGui.QBoxLayout import minimumSize [as 别名]
#.........这里部分代码省略.........
"""
self.__delayTimer.setInterval(delay)
def delay(self):
"""
Public method to get the delay value for the expand/shrink delay in milliseconds.
@return value for the expand/shrink delay in milliseconds (integer)
"""
return self.__delayTimer.interval()
def __cancelDelayTimer(self):
"""
Private method to cancel the current delay timer.
"""
self.__delayTimer.stop()
self.__actionMethod = None
def shrink(self):
"""
Public method to record a shrink request.
"""
self.__delayTimer.stop()
self.__actionMethod = self.__shrinkIt
self.__delayTimer.start()
def __shrinkIt(self):
"""
Private method to shrink the sidebar.
"""
self.__minimized = True
self.__bigSize = self.size()
if self.__orientation in [E4SideBar.North, E4SideBar.South]:
self.__minSize = self.minimumSizeHint().height()
self.__maxSize = self.maximumHeight()
else:
self.__minSize = self.minimumSizeHint().width()
self.__maxSize = self.maximumWidth()
if self.splitter:
self.splitterSizes = self.splitter.sizes()
self.__stackedWidget.hide()
if self.__orientation in [E4SideBar.North, E4SideBar.South]:
self.setFixedHeight(self.__tabBar.minimumSizeHint().height())
else:
self.setFixedWidth(self.__tabBar.minimumSizeHint().width())
self.__actionMethod = None
def expand(self):
"""
Private method to record a expand request.
"""
self.__delayTimer.stop()
self.__actionMethod = self.__expandIt
self.__delayTimer.start()
def __expandIt(self):
"""
Public method to expand the sidebar.
"""
self.__minimized = False
self.__stackedWidget.show()
self.resize(self.__bigSize)
if self.__orientation in [E4SideBar.North, E4SideBar.South]: