当前位置: 首页>>代码示例>>Python>>正文


Python QtGui.QTabWidget方法代码示例

本文整理汇总了Python中PyQt5.QtGui.QTabWidget方法的典型用法代码示例。如果您正苦于以下问题:Python QtGui.QTabWidget方法的具体用法?Python QtGui.QTabWidget怎么用?Python QtGui.QTabWidget使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在PyQt5.QtGui的用法示例。


在下文中一共展示了QtGui.QTabWidget方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __init__

# 需要导入模块: from PyQt5 import QtGui [as 别名]
# 或者: from PyQt5.QtGui import QTabWidget [as 别名]
def __init__(self, parent=None):
        super().__init__(parent)
        self.select_source = QtGui.QTabWidget(self)
        self.select_source.setGeometry(210, 50, 340, 200)

        self.init_shares_tab_ui()
        self.init_external_tab_ui()

        self.symbols_loader = SymbolsLoaderThread()
        self.symbols_loader.started.connect(self.on_symbols_loading)
        self.symbols_loader.symbols_loaded.connect(
            self.on_symbols_loaded, QtCore.Qt.QueuedConnection
        )
        self.symbols_loader.start()

        self.date_from = self.shares_date_from.date().toPyDate()
        self.date_to = self.shares_date_to.date().toPyDate() 
开发者ID:constverum,项目名称:Quantdom,代码行数:19,代码来源:ui.py

示例2: tabbed_qt4_window

# 需要导入模块: from PyQt5 import QtGui [as 别名]
# 或者: from PyQt5.QtGui import QTabWidget [as 别名]
def tabbed_qt4_window(self):
        from PyQt4 import QtGui
        from matplotlib.backends.backend_qt4agg import FigureCanvasQTAgg, NavigationToolbar2QT
        # mpl backend can already create instance
        # https://stackoverflow.com/a/40031190
        app = QtGui.QApplication.instance()
        if app is None:
            app = QtGui.QApplication([self.title])
        self.root_window = QtGui.QTabWidget()
        self.root_window.setWindowTitle(self.title)
        for name, fig in self.figures.items():
            tab = QtGui.QWidget(self.root_window)
            tab.canvas = FigureCanvasQTAgg(fig)
            vbox = QtGui.QVBoxLayout(tab)
            vbox.addWidget(tab.canvas)
            toolbar = NavigationToolbar2QT(tab.canvas, tab)
            vbox.addWidget(toolbar)
            tab.setLayout(vbox)
            for axes in fig.get_axes():
                if isinstance(axes, Axes3D):
                    # must explicitly allow mouse dragging for 3D plots
                    axes.mouse_init()
            self.root_window.addTab(tab, name)
        self.root_window.show()
        app.exec_() 
开发者ID:MichaelGrupp,项目名称:evo,代码行数:27,代码来源:plot.py

示例3: tabbed_qt5_window

# 需要导入模块: from PyQt5 import QtGui [as 别名]
# 或者: from PyQt5.QtGui import QTabWidget [as 别名]
def tabbed_qt5_window(self):
        from PyQt5 import QtGui, QtWidgets
        from matplotlib.backends.backend_qt5agg import FigureCanvasQTAgg, NavigationToolbar2QT
        # mpl backend can already create instance
        # https://stackoverflow.com/a/40031190
        app = QtGui.QGuiApplication.instance()
        if app is None:
            app = QtWidgets.QApplication([self.title])
        self.root_window = QtWidgets.QTabWidget()
        self.root_window.setWindowTitle(self.title)
        for name, fig in self.figures.items():
            tab = QtWidgets.QWidget(self.root_window)
            tab.canvas = FigureCanvasQTAgg(fig)
            vbox = QtWidgets.QVBoxLayout(tab)
            vbox.addWidget(tab.canvas)
            toolbar = NavigationToolbar2QT(tab.canvas, tab)
            vbox.addWidget(toolbar)
            tab.setLayout(vbox)
            for axes in fig.get_axes():
                if isinstance(axes, Axes3D):
                    # must explicitly allow mouse dragging for 3D plots
                    axes.mouse_init()
            self.root_window.addTab(tab, name)
        self.root_window.show()
        app.exec_() 
开发者ID:MichaelGrupp,项目名称:evo,代码行数:27,代码来源:plot.py

示例4: get_QTabWidget

# 需要导入模块: from PyQt5 import QtGui [as 别名]
# 或者: from PyQt5.QtGui import QTabWidget [as 别名]
def get_QTabWidget():
    """QTabWidget getter."""

    try:
        import PySide.QtGui as QtGui
        return QtGui.QTabWidget
    except ImportError:
        import PyQt5.QtWidgets as QtWidgets
        return QtWidgets.QTabWidget 
开发者ID:AirbusCyber,项目名称:grap,代码行数:11,代码来源:QtShim.py


注:本文中的PyQt5.QtGui.QTabWidget方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。