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


Python QWebInspector.setVisible方法代码示例

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


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

示例1: WebInspector

# 需要导入模块: from PyQt4.QtWebKit import QWebInspector [as 别名]
# 或者: from PyQt4.QtWebKit.QWebInspector import setVisible [as 别名]
class WebInspector(QWidget):

    def __init__(self, parent):
        QWidget.__init__(self, parent)
        vbox = QVBoxLayout(self)
        self._webInspector = QWebInspector(self)
        vbox.addWidget(self._webInspector)
        self.btnDock = QPushButton(translations.TR_UNDOCK)
        vbox.addWidget(self.btnDock)

        ExplorerContainer.register_tab(translations.TR_TAB_WEB_INSPECTOR, self)

    def refresh_inspector(self):
        self._webInspector.hide()
        self._webInspector.show()

    def set_inspection_page(self, page):
        self._webInspector.setPage(page)
        self._webInspector.setVisible(True)
开发者ID:WeAreLaVelle,项目名称:ninja-ide,代码行数:21,代码来源:web_inspector.py

示例2: WebInspector

# 需要导入模块: from PyQt4.QtWebKit import QWebInspector [as 别名]
# 或者: from PyQt4.QtWebKit.QWebInspector import setVisible [as 别名]
class WebInspector(QWidget):
    """WebInspector widget class"""

    def __init__(self, parent):
        QWidget.__init__(self, parent)
        vbox = QVBoxLayout(self)
        self._webInspector = QWebInspector(self)
        vbox.addWidget(self._webInspector)
        self.btnDock = QPushButton(translations.TR_UNDOCK)
        vbox.addWidget(self.btnDock)

        ExplorerContainer.register_tab(translations.TR_TAB_WEB_INSPECTOR, self)
        IDE.register_service('web_inspector', self)

    def refresh_inspector(self):
        """Refresh WebInspector widget by hiding and showing"""
        self._webInspector.hide()
        self._webInspector.show()

    def set_inspection_page(self, page):
        """Method to load an argument page object on the WebInspector"""
        self._webInspector.setPage(page)
        self._webInspector.setVisible(True)
开发者ID:AnyBucket,项目名称:ninja-ide,代码行数:25,代码来源:web_inspector.py

示例3: saveTranslations

# 需要导入模块: from PyQt4.QtWebKit import QWebInspector [as 别名]
# 或者: from PyQt4.QtWebKit.QWebInspector import setVisible [as 别名]
    def saveTranslations(self, translations):
        pass

    @pyqtSlot(int, result=str)
    def open_files(self, mode):
        a = QFileDialog()
        if mode == 1:
            v = a.getOpenFileNames(caption="Импорт файлов rpm...", filter="RPM Files (*.rpm);;Any files (*.*)")
            return json.dumps(str(v))
        elif mode == 2:
            return a.getExistingDirectory(options=QFileDialog.ShowDirsOnly)
        elif mode == 3:
            return a.getOpenFileName()


if __name__ == '__main__':
    app = QApplication(sys.argv)
    view = Browser()
    view.page().mainFrame().addToJavaScriptWindowObject("Bridge", view)
    view.setWindowTitle("Handsome Localizer v1.0")
    view.load(QUrl("html/main.html"))
    view.setVisible(True)
    view.setMinimumWidth(1024)
    view.setMinimumHeight(480)
    view.page().settings().setAttribute(QWebSettings.DeveloperExtrasEnabled, True)
    inspector = QWebInspector()
    inspector.setPage(view.page())
    inspector.setVisible(True)
    app.exec_()
开发者ID:zimy,项目名称:RosaLinuxLocalizer,代码行数:31,代码来源:pyqt-web.py


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