Python PySide.QtGui.QTextBrowser() Examples
The following are 3
code examples of PySide.QtGui.QTextBrowser().
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example.
You may also want to check out all available functions/classes of the module
PySide.QtGui
, or try the search function
.
Example #1
Source File: QtShim.py From grap with MIT License | 5 votes |
def get_QTextBrowser(): """QTextBrowser getter.""" try: import PySide.QtGui as QtGui return QtGui.QTextBrowser except ImportError: import PyQt5.QtWidgets as QtWidgets return QtWidgets.QTextBrowser
Example #2
Source File: HelpCmd.py From FreeCAD_Assembly4 with GNU Lesser General Public License v2.1 | 4 votes |
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)
Example #3
Source File: about_UIs.py From CNCGToolKit with MIT License | 4 votes |
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)