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


Python Qt.TextBrowserInteraction方法代码示例

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


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

示例1: __init__

# 需要导入模块: from PyQt5.QtCore import Qt [as 别名]
# 或者: from PyQt5.QtCore.Qt import TextBrowserInteraction [as 别名]
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() 
开发者ID:CountryTk,项目名称:Hydra,代码行数:23,代码来源:Browser.py

示例2: setup

# 需要导入模块: from PyQt5.QtCore import Qt [as 别名]
# 或者: from PyQt5.QtCore.Qt import TextBrowserInteraction [as 别名]
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) 
开发者ID:iGio90,项目名称:Dwarf,代码行数:24,代码来源:welcome_window.py

示例3: handle_about_action

# 需要导入模块: from PyQt5.QtCore import Qt [as 别名]
# 或者: from PyQt5.QtCore.Qt import TextBrowserInteraction [as 别名]
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() 
开发者ID:fre-sch,项目名称:mhw_armor_edit,代码行数:13,代码来源:suite.py

示例4: setupUi

# 需要导入模块: from PyQt5.QtCore import Qt [as 别名]
# 或者: from PyQt5.QtCore.Qt import TextBrowserInteraction [as 别名]
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
#------------------------------------------------------------------------------- 
开发者ID:Cisco-Talos,项目名称:CASC,代码行数:37,代码来源:casc_plugin.py

示例5: __init__

# 需要导入模块: from PyQt5.QtCore import Qt [as 别名]
# 或者: from PyQt5.QtCore.Qt import TextBrowserInteraction [as 别名]
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)) 
开发者ID:jziolkowski,项目名称:tdm,代码行数:8,代码来源:__init__.py

示例6: view_about

# 需要导入模块: from PyQt5.QtCore import Qt [as 别名]
# 或者: from PyQt5.QtCore.Qt import TextBrowserInteraction [as 别名]
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 
开发者ID:vrtadmin,项目名称:FIRST-plugin-ida,代码行数:44,代码来源:first.py


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