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


Python QtGui.QTextBrowser方法代码示例

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


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

示例1: get_QTextBrowser

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

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

示例2: drawUI

# 需要导入模块: from PySide import QtGui [as 别名]
# 或者: from PySide.QtGui import QTextBrowser [as 别名]
def drawUI(self):
        # Our main window will be a QDialog
        self.UI.setWindowTitle('Help for FreeCAD and Assembly4')
        self.UI.setWindowIcon( QtGui.QIcon( os.path.join( Asm4.iconPath , 'FreeCad.svg' ) ) )
        self.UI.setWindowFlags( QtCore.Qt.WindowStaysOnTopHint )
        self.UI.setMinimumSize(600, 600)
        self.UI.setModal(False)
        # set main window widgets layout
        self.mainLayout = QtGui.QVBoxLayout(self.UI)

        # FreeCAD version info
        FCmajor = App.ConfigGet('ExeVersion')
        FCminor = App.ConfigGet('BuildRevision')
        FCversion = FCmajor+'-'+FCminor
        self.mainLayout.addWidget(QtGui.QLabel('FreeCAD version : \t'+FCversion))

        # Assembly4 version info
        versionPath = os.path.join( Asm4.wbPath, 'VERSION' )
        versionFile = open(versionPath,"r")
        Asm4version = versionFile.readlines()[1]
        versionFile.close()
        self.mainLayout.addWidget(QtGui.QLabel('Assembly4 version : \t'+Asm4version))

        # Help text
        self.helpSource = QtGui.QTextBrowser()
        self.helpSource.setSearchPaths( [os.path.join( Asm4.wbPath, 'Resources' )] )
        self.helpSource.setSource( 'Asm4_Help.html' )
        self.mainLayout.addWidget(self.helpSource)
        self.mainLayout.addWidget(QtGui.QLabel(' '))

        # the button row definition
        self.buttonLayout = QtGui.QHBoxLayout()
        self.buttonLayout.addStretch()
        # OK button
        self.OkButton = QtGui.QPushButton('OK')
        self.OkButton.setDefault(True)
        self.buttonLayout.addWidget(self.OkButton)
        self.mainLayout.addLayout(self.buttonLayout)

        # finally, apply the layout to the main window
        self.UI.setLayout(self.mainLayout)

        # Actions
        self.OkButton.clicked.connect(self.onOK) 
开发者ID:Zolko-123,项目名称:FreeCAD_Assembly4,代码行数:46,代码来源:HelpCmd.py

示例3: setupUi

# 需要导入模块: from PySide import QtGui [as 别名]
# 或者: from PySide.QtGui import QTextBrowser [as 别名]
def setupUi(self, Dialog):
        Dialog.setObjectName("Dialog")
        Dialog.resize(465, 393)
        self.verticalLayout = QtGui.QVBoxLayout(Dialog)
        self.verticalLayout.setObjectName("verticalLayout")
        self.horizontalLayout = QtGui.QHBoxLayout()
        self.horizontalLayout.setContentsMargins(-1, 20, -1, 20)
        self.horizontalLayout.setObjectName("horizontalLayout")
        spacerItem = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
        self.horizontalLayout.addItem(spacerItem)
        self.icon_lb = QtGui.QLabel(Dialog)
        font = QtGui.QFont()
        font.setPointSize(20)
        self.icon_lb.setFont(font)
        self.icon_lb.setText("")
        self.icon_lb.setObjectName("icon_lb")
        self.horizontalLayout.addWidget(self.icon_lb)
        self.title_lb = QtGui.QLabel(Dialog)
        font = QtGui.QFont()
        font.setPointSize(20)
        self.title_lb.setFont(font)
        self.title_lb.setObjectName("title_lb")
        self.horizontalLayout.addWidget(self.title_lb)
        spacerItem1 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
        self.horizontalLayout.addItem(spacerItem1)
        self.verticalLayout.addLayout(self.horizontalLayout)
        self.text_link_lb = QtGui.QLabel(Dialog)
        self.text_link_lb.setObjectName("text_link_lb")
        self.verticalLayout.addWidget(self.text_link_lb)
        self.textBrowser = QtGui.QTextBrowser(Dialog)
        self.textBrowser.setObjectName("textBrowser")
        self.verticalLayout.addWidget(self.textBrowser)
        self.horizontalLayout_2 = QtGui.QHBoxLayout()
        self.horizontalLayout_2.setObjectName("horizontalLayout_2")
        self.donate_btn = QtGui.QPushButton(Dialog)
        self.donate_btn.setObjectName("donate_btn")
        self.horizontalLayout_2.addWidget(self.donate_btn)
        self.verticalLayout.addLayout(self.horizontalLayout_2)
        self.verticalLayout.setStretch(2, 1)

        self.retranslateUi(Dialog)
        QtCore.QMetaObject.connectSlotsByName(Dialog) 
开发者ID:cineuse,项目名称:CNCGToolKit,代码行数:44,代码来源:about_UIs.py


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