qwebview

how to make tabbed browser with qwebengine

我的未来我决定 提交于 2021-01-28 09:20:42
问题 I have some pyqt5 code that I am trying to make tabbed browser and how when I click target _blank link it opens in new tab with that link. Also, As I am still new to PyQt5 and practicing thorugh this project so I need some help.In the code I have 3 classes one holds mainwindow and one holds webview and one holds webpage. Here is the code: class Ui_MainWindow(QMainWindow): def __init__(self): super(Ui_MainWindow, self).__init__() self.setupUi(self) def setupUi(self, MainWindow): self

how to make tabbed browser with qwebengine

南笙酒味 提交于 2021-01-28 09:12:00
问题 I have some pyqt5 code that I am trying to make tabbed browser and how when I click target _blank link it opens in new tab with that link. Also, As I am still new to PyQt5 and practicing thorugh this project so I need some help.In the code I have 3 classes one holds mainwindow and one holds webview and one holds webpage. Here is the code: class Ui_MainWindow(QMainWindow): def __init__(self): super(Ui_MainWindow, self).__init__() self.setupUi(self) def setupUi(self, MainWindow): self

QWebView, how to access https protocol WebPage?

a 夏天 提交于 2021-01-28 05:49:00
问题 My platform: win32, QtSDK 2.4.1, MingW32, qt 4.7. I want to access Https protocol webpage by QWebView , how can i do that, i had download the openssl binary, and setup it, but QWebView doesn't work also, what is wrong? i needed to compile Qt source code and configure -openssl? #include<QApplication> #include<QtWebKit/QWebView> #include<QUrl> int main(int argc, char* argv[]) { QApplication app(argc, argv); QWebView view; view.setUrl(QUrl("https://webim.feixin.10086.cn/")); view.show(); return

QWebengine open createwindow if target _blank

让人想犯罪 __ 提交于 2020-08-20 06:16:50
问题 I have a code that suppose to open/create new window if the link is target _blank but, it doesn't do as intended and gives no action in return. Here is the code: class MyPage(QWebEnginePage): def __init__(self, parent=None): super(MyPage, self).__init__(parent) def triggerAction(self, action, checked=False): if action == QWebEnginePage.OpenLinkInNewWindow: self.createWindow(QWebEnginePage.WebBrowserWindow) return super(MyPage, self).triggerAction(action, checked) class MyWindow

QWebengine open createwindow if target _blank

自古美人都是妖i 提交于 2020-08-20 06:16:26
问题 I have a code that suppose to open/create new window if the link is target _blank but, it doesn't do as intended and gives no action in return. Here is the code: class MyPage(QWebEnginePage): def __init__(self, parent=None): super(MyPage, self).__init__(parent) def triggerAction(self, action, checked=False): if action == QWebEnginePage.OpenLinkInNewWindow: self.createWindow(QWebEnginePage.WebBrowserWindow) return super(MyPage, self).triggerAction(action, checked) class MyWindow

How to use qwebkitplatformplugin?

邮差的信 提交于 2020-01-16 03:20:26
问题 how to use qwebkitplatformplugin in a QWebView ? I have the following code: #include <QWebKitPlatformPlugin> MainWindow::MainWindow(QWidget *parent, bool new) : QMainWindow(parent), ui(new Ui::MainWindow) { ui->setupUi(this); webView = new QWebView; ui->webViewLay->addWidget(webView); webView->setHtml("<p>test</p>"); } but found no example of how to use extensions from qwebkitplatformplugin . [edit] Within this API has several extensions such as SpellChecker and Notifications , I would like

How to use qwebkitplatformplugin?

徘徊边缘 提交于 2020-01-16 03:20:07
问题 how to use qwebkitplatformplugin in a QWebView ? I have the following code: #include <QWebKitPlatformPlugin> MainWindow::MainWindow(QWidget *parent, bool new) : QMainWindow(parent), ui(new Ui::MainWindow) { ui->setupUi(this); webView = new QWebView; ui->webViewLay->addWidget(webView); webView->setHtml("<p>test</p>"); } but found no example of how to use extensions from qwebkitplatformplugin . [edit] Within this API has several extensions such as SpellChecker and Notifications , I would like

QWebView Wait for load

不问归期 提交于 2020-01-15 03:10:34
问题 bool MainWindow::waitForLoad(QWebView& view) { QEventLoop loopLoad; QTimer timer; QObject::connect(&view, SIGNAL(loadFinished(bool)), &loopLoad, SLOT(quit())); QObject::connect(&timer, SIGNAL(timeout()), &loopLoad, SLOT(quit())); timer.start(timeout); loopLoad.exec(); if(!timer.isActive()) { timer.stop(); view.stop(); return false; } return true; } Say me, is that a correct code? App sometimes freezes after line loopLoad.exec(); And always returns true even here has happened some problem

Error downloading

别说谁变了你拦得住时间么 提交于 2020-01-14 22:46:26
问题 to download a console returns the following error: Frame load interrupted by policy change Example: <a href="app.exe">Start Download</a> Console Preview: Should I configure something in the Compiler or QWebSettings ? 回答1: I discovered. In conventional Webkit browsers, the place to download the console shows how the request canceled, so before turning to "download manager" of the browser the request should be canceled. solution: //replace [QWebView] by your WebView connect([QWebView]->page(),

How to set QWebView's socket options?

寵の児 提交于 2020-01-14 04:09:09
问题 I want to set socket options such as receive buffer size,tcpNoDelay with QWebView.But i could not find any methods in QWebView to do this.I can't get the connection socket from QWebView,any idea? Thanks. 回答1: QWebView doesn't use QTcpSocket directly. It uses QNetworkAccessManager. QNetworkAccessManager doesn't expose access to QTcpSockets. The only thing I can think of to control such things is to inherit QNetworkAccessManager, override createRequest method, that provides own QNetworkReply