本文整理汇总了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)
示例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)
示例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_()