本文整理汇总了Python中PyQt4.QtGui.QTabBar.setTabWhatsThis方法的典型用法代码示例。如果您正苦于以下问题:Python QTabBar.setTabWhatsThis方法的具体用法?Python QTabBar.setTabWhatsThis怎么用?Python QTabBar.setTabWhatsThis使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PyQt4.QtGui.QTabBar
的用法示例。
在下文中一共展示了QTabBar.setTabWhatsThis方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: E4SideBar
# 需要导入模块: from PyQt4.QtGui import QTabBar [as 别名]
# 或者: from PyQt4.QtGui.QTabBar import setTabWhatsThis [as 别名]
#.........这里部分代码省略.........
@param index index of the tab (integer)
@param text text to set (QString)
"""
self.__tabBar.setTabText(index, text)
def tabToolTip(self, index):
"""
Public method to get the tooltip text of a tab.
@param index index of the tab (integer)
@return tooltip text of the tab (QString)
"""
return self.__tabBar.tabToolTip(index)
def setTabToolTip(self, index, tip):
"""
Public method to set the tooltip text of a tab.
@param index index of the tab (integer)
@param tooltip text text to set (QString)
"""
self.__tabBar.setTabToolTip(index, tip)
def tabWhatsThis(self, index):
"""
Public method to get the WhatsThis text of a tab.
@param index index of the tab (integer)
@return WhatsThis text of the tab (QString)
"""
return self.__tabBar.tabWhatsThis(index)
def setTabWhatsThis(self, index, text):
"""
Public method to set the WhatsThis text of a tab.
@param index index of the tab (integer)
@param WhatsThis text text to set (QString)
"""
self.__tabBar.setTabWhatsThis(index, text)
def widget(self, index):
"""
Public method to get a reference to the widget associated with a tab.
@param index index of the tab (integer)
@return reference to the widget (QWidget)
"""
return self.__stackedWidget.widget(index)
def saveState(self):
"""
Public method to save the state of the sidebar.
@return saved state as a byte array (QByteArray)
"""
if len(self.splitterSizes) == 0:
if self.splitter:
self.splitterSizes = self.splitter.sizes()
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()
示例2: SideBar
# 需要导入模块: from PyQt4.QtGui import QTabBar [as 别名]
# 或者: from PyQt4.QtGui.QTabBar import setTabWhatsThis [as 别名]
#.........这里部分代码省略.........
self.expand()
return
def indexOf( self, widget ):
""" Provides the index of the given widget """
return self.__stackedWidget.indexOf( widget )
def isTabEnabled( self, index ):
""" Check if the tab is enabled """
return self.__tabBar.isTabEnabled( index )
def setTabEnabled( self, index, enabled ):
""" Set the enabled state of the tab """
self.__tabBar.setTabEnabled( index, enabled )
return
def orientation( self ):
""" Provides the orientation of the sidebar """
return self.__orientation
def setOrientation( self, orient ):
""" Set the orientation of the sidebar """
if orient == SideBar.North:
self.__tabBar.setShape( QTabBar.RoundedNorth )
self.barLayout.setDirection( QBoxLayout.LeftToRight )
self.layout.setDirection( QBoxLayout.TopToBottom )
self.layout.setAlignment( self.barLayout, Qt.AlignLeft )
elif orient == SideBar.East:
self.__tabBar.setShape( QTabBar.RoundedEast )
self.barLayout.setDirection( QBoxLayout.TopToBottom )
self.layout.setDirection( QBoxLayout.RightToLeft )
self.layout.setAlignment( self.barLayout, Qt.AlignTop )
elif orient == SideBar.South:
self.__tabBar.setShape( QTabBar.RoundedSouth )
self.barLayout.setDirection( QBoxLayout.LeftToRight )
self.layout.setDirection( QBoxLayout.BottomToTop )
self.layout.setAlignment( self.barLayout, Qt.AlignLeft )
else:
# default
orient = SideBar.West
self.__tabBar.setShape( QTabBar.RoundedWest )
self.barLayout.setDirection( QBoxLayout.TopToBottom )
self.layout.setDirection( QBoxLayout.LeftToRight )
self.layout.setAlignment( self.barLayout, Qt.AlignTop )
self.__orientation = orient
return
def tabIcon( self, index ):
""" Provide the icon of the tab """
return self.__tabBar.tabIcon( index )
def setTabIcon( self, index, icon ):
""" Set the icon of the tab """
self.__tabBar.setTabIcon( index, icon )
return
def tabText( self, index ):
""" Provide the text of the tab """
return self.__tabBar.tabText( index )
def setTabText( self, index, text ):
""" Set the text of the tab """
self.__tabBar.setTabText( index, text )
return
def tabToolTip( self, index ):
""" Provide the tooltip text of the tab """
return self.__tabBar.tabToolTip( index )
def setTabToolTip( self, index, tip ):
""" Set the tooltip text of the tab """
self.__tabBar.setTabToolTip( index, tip )
return
def tabWhatsThis( self, index ):
""" Provide the WhatsThis text of the tab """
return self.__tabBar.tabWhatsThis( index )
def setTabWhatsThis( self, index, text ):
""" Set the WhatsThis text for the tab """
self.__tabBar.setTabWhatsThis( index, text )
return
def widget( self, index ):
""" Provides the reference to the widget (QWidget) """
return self.__stackedWidget.widget( index )