本文整理汇总了Python中PyQt5.QtWebEngineWidgets.QWebEngineView.back方法的典型用法代码示例。如果您正苦于以下问题:Python QWebEngineView.back方法的具体用法?Python QWebEngineView.back怎么用?Python QWebEngineView.back使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PyQt5.QtWebEngineWidgets.QWebEngineView
的用法示例。
在下文中一共展示了QWebEngineView.back方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: X0h
# 需要导入模块: from PyQt5.QtWebEngineWidgets import QWebEngineView [as 别名]
# 或者: from PyQt5.QtWebEngineWidgets.QWebEngineView import back [as 别名]
class X0h(XrayServerWidget):
name = "X0h"
description = "X0h"
icon = "icons/x0h.png"
maintainer = "Luca Rebuffi"
maintainer_email = "luca.rebuffi(@[email protected])elettra.eu"
priority = 1
category = "X0h"
keywords = ["data", "file", "load", "read"]
want_main_area = 1
outputs = [{"name": "xrayserver_data",
"type": DataExchangeObject,
"doc": "xrayserver_data",
"id": "xrayserver_data"}, ]
def __init__(self):
super().__init__()
left_box_1 = oasysgui.widgetBox(self.controlArea, "X0h Request Form", addSpace=True, orientation="vertical",
width=610, height=640)
html = self.clear_input_form(HttpManager.send_xray_server_direct_request("/cgi/www_form.exe?template=x0h_form.htm"))
self.x0h_input = QWebView(left_box_1)
self.x0h_input.setHtml(html)
left_box_1.layout().addWidget(self.x0h_input)
self.x0h_input.setFixedHeight(540)
self.x0h_input.setFixedWidth(590)
button = gui.button(self.controlArea, self, "Get X0h!", callback=self.submit)
button.setFixedHeight(30)
gui.rubber(self.controlArea)
self.tabs = []
self.tabs_widget = oasysgui.tabWidget(self.mainArea)
self.initializeTabs()
self.x0h_output = QWebView(self.tabs[0])
self.tabs[0].layout().addWidget(self.x0h_output)
self.x0h_output.setFixedHeight(630)
self.x0h_output.setFixedWidth(740)
def clear_input_form(self, html):
temp_1 = html.split("<body onload=\"setOnloads()\">")[0]
temp_2 = html.split("<table cellspacing=0 cellpadding=0 border=0 bgcolor=\"#c1c1c1\"><tr><td>")[1]
html = temp_1 + "<body>\n<table cellspacing=0 cellpadding=0 border=0 bgcolor=\"#c1c1c1\"><tr><td>\n" + temp_2
html = html.split("<input type=SUBMIT value=\"Get X0h!\"><input type=RESET> <br>")[0]
html += "\n<input type=SUBMIT style=\"display: none;\" id=\"submit-btn\"><input type=RESET style=\"display: none;\" id=\"reset-btn\"> <br>"
html += "\n</form>"
html += "\n</td></tr></table>"
html += "\n</td></tr></table>"
html += "\n</body>"
html += "\n</html>"
temp_1, temp_2 = html.split("x0h.js")
html = temp_1 + XRAY_SERVER_URL + "/x0h.js" + temp_2
temp_1, temp_2 = html.split("/cgi/x0h_form.exe")
html = temp_1 + XRAY_SERVER_URL + "/cgi/x0h_form.exe" + temp_2
return html
def getLeftPartWidth(self):
return 620
def initializeTabs(self):
current_tab = self.tabs_widget.currentIndex()
size = len(self.tabs)
for index in range(0, size):
self.tabs_widget.removeTab(size-1-index)
self.tabs = [gui.createTabPage(self.tabs_widget, "X-ray Server Ouput"),
gui.createTabPage(self.tabs_widget, "Critical Angle for TER"),
gui.createTabPage(self.tabs_widget, "Darwin Curve (" + u"\u03C3" + " Pol.)"),
gui.createTabPage(self.tabs_widget, "Darwin Curve (" + u"\u03C0" + " Pol.)"),
]
for tab in self.tabs:
tab.setFixedHeight(650)
tab.setFixedWidth(750)
self.plot_canvas = [None, None, None]
self.tabs_widget.setCurrentIndex(current_tab)
def js_callback(self, result):
pass
#.........这里部分代码省略.........