本文整理汇总了Python中PySide.QtGui.QTabWidget.resize方法的典型用法代码示例。如果您正苦于以下问题:Python QTabWidget.resize方法的具体用法?Python QTabWidget.resize怎么用?Python QTabWidget.resize使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PySide.QtGui.QTabWidget
的用法示例。
在下文中一共展示了QTabWidget.resize方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: UiMain
# 需要导入模块: from PySide.QtGui import QTabWidget [as 别名]
# 或者: from PySide.QtGui.QTabWidget import resize [as 别名]
class UiMain(QMainWindow):
""" The main gui interface, invokes all windows and ties everything
together
"""
def __init__(self):
""" automatically called __init__ function """
super(UiMain, self).__init__()
# initialize all the variables that are going to be defined in the
# future
self.update_dialog = None
self.update_dialog_lbl = None
self.app_select_box = None
self.selector_lbl = None
self.current_playing_lbl = None
self.current_playing = None
self.misc_messages = None
self.start_btn = None
self.output_dir_lbl = None
self.select_output_dir_btn = None
self.output_cur_dir_lbl = None
self.active_items_list = None
self.inactive_items_list = None
self.switch_active_item_button_off = None
self.switch_active_item_button_on = None
self.switch_output_split_btn = None
self.switch_output_split_lbl = None
# initialize the system tray
# self.system_tray = QSystemTrayIcon(self)
# self.system_tray.setIcon(QIcon(resource_path('icon.png')))
# self.system_tray.show()
# self.system_tray.setToolTip('SMG')
# self.system_tray.activated.connect(self.on_systray_activated)
# initialize the main window
self.setObjectName('self')
self.setWindowTitle('SMG - By Azeirah')
self.resize(400, 250)
# Gives the self an icon
self.setWindowIcon(QIcon(resource_path('icon.png')))
# create the tabs
# the tab widget itself
self.tabbed_windows = QTabWidget(self)
self.tabbed_windows.resize(400, 300)
# tab 1, contains the music player selection
self.music_players = QFrame()
# tab 2, contains options
self.options = QFrame()
self.tabbed_windows.addTab(self.music_players, 'Music players')
self.tabbed_windows.addTab(self.options, 'Options')
# initializes the two tabs, with all the code down below
self.tab_music_players()
self.tab_options()
# shows the main window
self.show()
def closeEvent(self, event):
""" an automatically called function when the program is about to
close.
"""
# Stops all Threads. These would continue to run in the background
# Even if the window was closed.
Main.running = False
# close the ZuneNowPlaying.exe process
if Constants.SUBP:
Constants.SUBP.kill()
def changeEvent(self, event):
# if event.type() == QEvent.WindowStateChange:
# if self.isMinimized():
# event.ignore()
# self.hide()
# self.system_tray.showMessage('Running', 'Running in the
# background.')
# return
super(UiMain, self).changeEvent(event)
def on_systray_activated(self, reason):
if reason == QSystemTrayIcon.DoubleClick:
self.show()
@staticmethod
def toggle_split(event):
# 0 = Qt.Unchecked The item is unchecked.
# 1 = Qt.PartiallyChecked The item is partially checked. Items in
# hierarchical models may be partially checked if some, but not all,
# of
# their children are checked.
# 2 = Qt.Checked The item is checked.
#.........这里部分代码省略.........