Python PyQt5.QtCore.Qt.TextBrowserInteraction() Examples
The following are 7
code examples of PyQt5.QtCore.Qt.TextBrowserInteraction().
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
PyQt5.QtCore.Qt
, or try the search function
.
Example #1
Source File: Browser.py From Hydra with GNU General Public License v3.0 | 6 votes |
def __init__(self, url): super().__init__() self.layout = QHBoxLayout() self.editor = QLabel() self.layout.addWidget(self.editor) self.editor.setTextInteractionFlags(Qt.LinksAccessibleByMouse) self.editor.setText( """ <h2> Sorry, support for Windows systems will come soon! </h2> <h2> Here are some links related to the issue: <a href=\"https://github.com/pyqt/python-qt5/issues/21\">https://github.com/pyqt/python-qt5/issues/21</a> </h2> """ ) self.editor.setTextFormat(Qt.RichText) self.editor.setTextInteractionFlags(Qt.TextBrowserInteraction) self.editor.setOpenExternalLinks(True) self.setLayout(self.layout) self.show()
Example #2
Source File: welcome_window.py From Dwarf with GNU General Public License v3.0 | 6 votes |
def setup(self): """ Setup ui """ h_box = QHBoxLayout() h_box.setContentsMargins(0, 0, 0, 0) update_label = QLabel( 'A newer Version of Dwarf is available. Checkout <a style="color:white;" ' 'href="https://github.com/iGio90/Dwarf">Dwarf on GitHub</a> for more informations' ) update_label.setOpenExternalLinks(True) update_label.setTextFormat(Qt.RichText) update_label.setTextInteractionFlags(Qt.TextBrowserInteraction) self.update_button = QPushButton('Update now!', update_label) self.update_button.setStyleSheet('padding: 0; border-color: white;') self.update_button.setGeometry( self.parent().width() - 10 - update_label.width() * .2, 5, update_label.width() * .2, 25) self.update_button.clicked.connect(self.update_now_clicked) #self.setMaximumHeight(35) h_box.addWidget(update_label) self.setLayout(h_box)
Example #3
Source File: suite.py From mhw_armor_edit with The Unlicense | 5 votes |
def handle_about_action(self): dialog = QDialog(self) dialog.setWindowTitle("About MHW Editor Suite") layout = QVBoxLayout() dialog.setLayout(layout) about_text = QLabel(ABOUT_TEXT) about_text.setTextFormat(Qt.RichText) about_text.setTextInteractionFlags(Qt.TextBrowserInteraction) about_text.setOpenExternalLinks(True) layout.addWidget(about_text) dialog.exec()
Example #4
Source File: casc_plugin.py From CASC with GNU General Public License v2.0 | 5 votes |
def setupUi(self, Dialog): Dialog.setObjectName('Dialog') Dialog.setWindowIcon(get_clamav_icon()) Dialog.setWindowTitle('Submit Your ClamAV Signature') Dialog.resize(430, 300) # Email Body Area self.link = QtWidgets.QLabel('') self.link.setTextFormat(Qt.RichText) self.link.setTextInteractionFlags(Qt.TextBrowserInteraction) self.link.setOpenExternalLinks(True) self.email_body = QtWidgets.QPlainTextEdit() self.email_body.setReadOnly(True) # Ok Button Area self.button_box = QtWidgets.QDialogButtonBox() self.button_box.setOrientation(Qt.Horizontal) self.button_box.setStandardButtons(QtWidgets.QDialogButtonBox.Ok) self.button_box.setObjectName('button_box') self.hbox_bottom = QtWidgets.QHBoxLayout() self.hbox_bottom.addWidget(self.button_box) # Vertical Layout self.vbox_outer = QtWidgets.QVBoxLayout(Dialog) self.vbox_outer.setObjectName('vbox_outer') self.vbox_outer.addWidget(self.link) self.vbox_outer.addWidget(self.email_body) self.vbox_outer.addLayout(self.hbox_bottom) # Signal Handling self.button_box.accepted.connect(Dialog.accept) # Class to interface with Dialog GUIs and the back end data #-------------------------------------------------------------------------------
Example #5
Source File: __init__.py From tdm with GNU General Public License v3.0 | 5 votes |
def __init__(self, cmd, title="", *args, **kwargs): super(CmdWikiUrl, self).__init__(*args, **kwargs) self.setTextFormat(Qt.RichText) self.setTextInteractionFlags(Qt.TextBrowserInteraction) self.setOpenExternalLinks(True) self.setText("<a href=https://github.com/arendst/Sonoff-Tasmota/wiki/Commands#{}>{}</a>".format(cmd, title if title else cmd))
Example #6
Source File: __init__.py From tdm with GNU General Public License v3.0 | 5 votes |
def __init__(self, *args, **kwargs): super(HTMLLabel, self).__init__(*args, **kwargs) self.setTextFormat(Qt.RichText) self.setTextInteractionFlags(Qt.TextBrowserInteraction) self.setOpenExternalLinks(True) self.setWordWrap(True)
Example #7
Source File: first.py From FIRST-plugin-ida with GNU General Public License v2.0 | 4 votes |
def view_about(self): self.thread_stop = True container = QtWidgets.QVBoxLayout() label = QtWidgets.QLabel('FIRST ') label.setStyleSheet('font: 24px;') container.addWidget(label) label = QtWidgets.QLabel('Function Identification and Recovery Signature Tool') label.setStyleSheet('font: 12px;') container.addWidget(label) grid_layout = QtWidgets.QGridLayout() grid_layout.addWidget(QtWidgets.QLabel('Version'), 0, 0) grid_layout.addWidget(QtWidgets.QLabel(str(FIRST.VERSION)), 0, 1) grid_layout.addWidget(QtWidgets.QLabel('Date'), 1, 0) grid_layout.addWidget(QtWidgets.QLabel(FIRST.DATE), 1, 1) grid_layout.addWidget(QtWidgets.QLabel('Report Issues'), 2, 0) label = QtWidgets.QLabel(('<a href="https://github.com/' 'vrtadmin/FIRST-plugin-ida/issues">' 'github.com/vrtadmin/FIRST-plugin-ida</a>')) label.setTextFormat(Qt.RichText) label.setTextInteractionFlags(Qt.TextBrowserInteraction) label.setOpenExternalLinks(True) grid_layout.addWidget(label, 2, 1) grid_layout.setColumnMinimumWidth(0, 100) grid_layout.setColumnStretch(1, 1) grid_layout.setContentsMargins(10, 0, 0, 0) container.addSpacing(10) container.addLayout(grid_layout) container.addStretch() copyright = '{}-{} Cisco Systems, Inc.'.format(FIRST.BEGIN, FIRST.END) label = QtWidgets.QLabel(copyright) label.setStyleSheet('font: 10px;') label.setAlignment(Qt.AlignCenter) container.addWidget(label) return container