Using QWebkit for windows with mingw
-
@artwaw
Yes sir, I did that. Above mentioned errors are produced by using precompiled binariesThat method din't work so I was thinking of building but couldn't clone the repo.
Are there other options with QT with mingw and windows. I don't need any support for linux
@Thank-You How did you install those precompiled binaries? Can you show your .pro file? It looks like those are not placed correctly, hence the fail.
-
@Thank-You How did you install those precompiled binaries? Can you show your .pro file? It looks like those are not placed correctly, hence the fail.
How did you install those precompiled binaries?
I just copied all files and moved to
C:/Qt/Qt5.12.8/5.12.8/mingw73_32/
for 32 bit and on 64 bitC:/Qt/Qt5.12.8/5.12.8/mingw73_32/
web.pro
QT += core gui webkitwidgets greaterThan(QT_MAJOR_VERSION, 4): QT += widgets CONFIG += c++11 # You can make your code fail to compile if it uses deprecated APIs. # In order to do so, uncomment the following line. #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 SOURCES += \ main.cpp \ mainwindow.cpp HEADERS += \ mainwindow.h FORMS += \ mainwindow.ui
mainwindow.h
#ifndef MAINWINDOW_H #define MAINWINDOW_H #include <QMainWindow> #include<QWebView> #include<QtWebKit/QtWebKit> #include<QtWebChannel/QWebChannel> #include<QVBoxLayout> QT_BEGIN_NAMESPACE namespace Ui { class MainWindow; } QT_END_NAMESPACE class MainWindow : public QMainWindow { Q_OBJECT public: MainWindow(QWidget *parent = nullptr); ~MainWindow(); private: Ui::MainWindow *ui; QWebView *view ; QVBoxLayout *layout; QWidget *wid; }; #endif // MAINWINDOW_H
mainwindow.cpp
#include "mainwindow.h" #include "ui_mainwindow.h" #include<QHBoxLayout> MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent) , ui(new Ui::MainWindow) { ui->setupUi(this); wid = new QWidget(); layout = new QVBoxLayout(wid); view = new QWebView(this); view->load(QUrl("https://google.com")); layout->addWidget(view); wid->setLayout(layout); setCentralWidget(wid); } MainWindow::~MainWindow() { delete ui; }
I hope it's correct 😂😂😂
-
How did you install those precompiled binaries?
I just copied all files and moved to
C:/Qt/Qt5.12.8/5.12.8/mingw73_32/
for 32 bit and on 64 bitC:/Qt/Qt5.12.8/5.12.8/mingw73_32/
web.pro
QT += core gui webkitwidgets greaterThan(QT_MAJOR_VERSION, 4): QT += widgets CONFIG += c++11 # You can make your code fail to compile if it uses deprecated APIs. # In order to do so, uncomment the following line. #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 SOURCES += \ main.cpp \ mainwindow.cpp HEADERS += \ mainwindow.h FORMS += \ mainwindow.ui
mainwindow.h
#ifndef MAINWINDOW_H #define MAINWINDOW_H #include <QMainWindow> #include<QWebView> #include<QtWebKit/QtWebKit> #include<QtWebChannel/QWebChannel> #include<QVBoxLayout> QT_BEGIN_NAMESPACE namespace Ui { class MainWindow; } QT_END_NAMESPACE class MainWindow : public QMainWindow { Q_OBJECT public: MainWindow(QWidget *parent = nullptr); ~MainWindow(); private: Ui::MainWindow *ui; QWebView *view ; QVBoxLayout *layout; QWidget *wid; }; #endif // MAINWINDOW_H
mainwindow.cpp
#include "mainwindow.h" #include "ui_mainwindow.h" #include<QHBoxLayout> MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent) , ui(new Ui::MainWindow) { ui->setupUi(this); wid = new QWidget(); layout = new QVBoxLayout(wid); view = new QWebView(this); view->load(QUrl("https://google.com")); layout->addWidget(view); wid->setLayout(layout); setCentralWidget(wid); } MainWindow::~MainWindow() { delete ui; }
I hope it's correct 😂😂😂
@Thank-You said in Using QWebkit for windows with mingw:
I just copied all files and moved to C:/Qt/Qt5.12.8/5.12.8/mingw73_32/ for 32 bit and on 64 bit C:/Qt/Qt5.12.8/5.12.8/mingw73_32/
what
-
How did you install those precompiled binaries?
I just copied all files and moved to
C:/Qt/Qt5.12.8/5.12.8/mingw73_32/
for 32 bit and on 64 bitC:/Qt/Qt5.12.8/5.12.8/mingw73_32/
web.pro
QT += core gui webkitwidgets greaterThan(QT_MAJOR_VERSION, 4): QT += widgets CONFIG += c++11 # You can make your code fail to compile if it uses deprecated APIs. # In order to do so, uncomment the following line. #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 SOURCES += \ main.cpp \ mainwindow.cpp HEADERS += \ mainwindow.h FORMS += \ mainwindow.ui
mainwindow.h
#ifndef MAINWINDOW_H #define MAINWINDOW_H #include <QMainWindow> #include<QWebView> #include<QtWebKit/QtWebKit> #include<QtWebChannel/QWebChannel> #include<QVBoxLayout> QT_BEGIN_NAMESPACE namespace Ui { class MainWindow; } QT_END_NAMESPACE class MainWindow : public QMainWindow { Q_OBJECT public: MainWindow(QWidget *parent = nullptr); ~MainWindow(); private: Ui::MainWindow *ui; QWebView *view ; QVBoxLayout *layout; QWidget *wid; }; #endif // MAINWINDOW_H
mainwindow.cpp
#include "mainwindow.h" #include "ui_mainwindow.h" #include<QHBoxLayout> MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent) , ui(new Ui::MainWindow) { ui->setupUi(this); wid = new QWidget(); layout = new QVBoxLayout(wid); view = new QWebView(this); view->load(QUrl("https://google.com")); layout->addWidget(view); wid->setLayout(layout); setCentralWidget(wid); } MainWindow::~MainWindow() { delete ui; }
I hope it's correct 😂😂😂
@Thank-You also if I am not mistaken you need not only
webkitwidgets
- I have a program that uses webkit as w page viewer, written some time ago, but its pro file had to haveQt += webkitwidgets webkit
together to work properly. I am not certain if this might be the case but please try, as I said it was some time ago. -
@Thank-You also if I am not mistaken you need not only
webkitwidgets
- I have a program that uses webkit as w page viewer, written some time ago, but its pro file had to haveQt += webkitwidgets webkit
together to work properly. I am not certain if this might be the case but please try, as I said it was some time ago.@artwaw said in Using QWebkit for windows with mingw:
you need not only webkitwidgets
Sorry, I was trying to tweak things if it will work after you asked about .pro file. I had actually have both
what
What Should I do?
Isn't it correct.
https://forum.qt.io/topic/119469/webkit-for-mingw-how-to-build/18 -
@artwaw said in Using QWebkit for windows with mingw:
you need not only webkitwidgets
Sorry, I was trying to tweak things if it will work after you asked about .pro file. I had actually have both
what
What Should I do?
Isn't it correct.
https://forum.qt.io/topic/119469/webkit-for-mingw-how-to-build/18@Thank-You Just to make sure: you copied 32bit files to 32bit mingw at
mingw73_32
(which makes sense) and then you copied 64bit files to 32bit mingw folder, possibly overwriting 32bit libraries copied previously? -
@Thank-You Just to make sure: you copied 32bit files to 32bit mingw at
mingw73_32
(which makes sense) and then you copied 64bit files to 32bit mingw folder, possibly overwriting 32bit libraries copied previously?@artwaw
Single option is given:
qtwebkit-Windows-Windows_10-Mingw73-Windows-Windows_10-X86_64.7zSo I copied same things to both directories.
This is bin folder. It doesn't have any differencesand others are also same. Files aren't seperated
-
@artwaw
Single option is given:
qtwebkit-Windows-Windows_10-Mingw73-Windows-Windows_10-X86_64.7zSo I copied same things to both directories.
This is bin folder. It doesn't have any differencesand others are also same. Files aren't seperated
@Thank-You said in Using QWebkit for windows with mingw:
X86_64.7z
Those are 64bit binaries. They will not work if you compile for 32bit target.
-
@Thank-You said in Using QWebkit for windows with mingw:
X86_64.7z
Those are 64bit binaries. They will not work if you compile for 32bit target.
-
@Thank-You said in Using QWebkit for windows with mingw:
Where can I get 32bit binaries?
On the same link from above I would guess.
-
Ok But compiling with 64 bit also gives error on both debug and release.(Mentioned at the main post)
What about it?
Where can I get 32bit binaries?@Thank-You said in Using QWebkit for windows with mingw:
But compiling with 64 bit also gives error on both debug and release.(Mentioned at the main post)
Hardly a surprise if you did not copy the 64bit binaries to the 64bit part of Qt tree.
-
@Thank-You said in Using QWebkit for windows with mingw:
But compiling with 64 bit also gives error on both debug and release.(Mentioned at the main post)
Hardly a surprise if you did not copy the 64bit binaries to the 64bit part of Qt tree.
-
@artwaw
I tried using windows 7 32bit binaries in 32 bit and it compiled but shows messageThe program has unexpectedly finished. The process was ended forcefully.
I couldn't make it working
@Thank-You You can try to use a Dependency Walker tool to identify what's missing.
-
@Thank-You You can try to use a Dependency Walker tool to identify what's missing.
-
@artwaw
I used it. Found outlibxml2-2.dll libxslt-1.dll
were not present after runningwindeployqt
. So I copied them to executable directory.
After that it shows this error.
@Thank-You said in Using QWebkit for windows with mingw:
Qt5WebKitWidgets.dll is looking for
QtPrivate::argToQString(QStringView)
, which is present in recent versions of Qt Core.It sounds like the latest Qt WebKit binaries are built against Qt 5.14:
- https://forum.qt.io/post/689916
- https://github.com/qtwebkit/qtwebkit/releases/tag/qtwebkit-5.212.0-alpha4
Can you update to Qt 5.14 or Qt 5.15?
-
@Thank-You said in Using QWebkit for windows with mingw:
Qt5WebKitWidgets.dll is looking for
QtPrivate::argToQString(QStringView)
, which is present in recent versions of Qt Core.It sounds like the latest Qt WebKit binaries are built against Qt 5.14:
- https://forum.qt.io/post/689916
- https://github.com/qtwebkit/qtwebkit/releases/tag/qtwebkit-5.212.0-alpha4
Can you update to Qt 5.14 or Qt 5.15?
-
Yes, that's one of the strength of Qt.
-
I installed QT 5.15.2 and build with it. Got all dependencies with windeployqt and added
libxml2-2.dll libxslt-1.dll
.
It now shows errorzlib1__.dll
not found.
I searched in whole qt directory but couldn't find one so I managed to downloadzlib1.dll
notzlib1__.dll
from dll-files.com.
I renamedzlib1.dll
tozlib1__.dll
and placed in binary directory. I don't know if this is good to do.
Where is zlib1__.dll located in QT??? OR it isn't related with QT?Atleast it is working in 64bit version but shows
TLS initialization failed
Which is connected to OpenSSL so I am sure I will solve this problem.
Edit:
I copiedlibcrypto-3-x64.dll
andlibssl-3-x64.dll
to executable directory but couldn't get it working
Now some problems that I can't figure out are:
It doesn't work with debug
Most importantly it doesn't work with 32 bit which is most for me.
How can I obtain it? -
I installed QT 5.15.2 and build with it. Got all dependencies with windeployqt and added
libxml2-2.dll libxslt-1.dll
.
It now shows errorzlib1__.dll
not found.
I searched in whole qt directory but couldn't find one so I managed to downloadzlib1.dll
notzlib1__.dll
from dll-files.com.
I renamedzlib1.dll
tozlib1__.dll
and placed in binary directory. I don't know if this is good to do.
Where is zlib1__.dll located in QT??? OR it isn't related with QT?Atleast it is working in 64bit version but shows
TLS initialization failed
Which is connected to OpenSSL so I am sure I will solve this problem.
Edit:
I copiedlibcrypto-3-x64.dll
andlibssl-3-x64.dll
to executable directory but couldn't get it working
Now some problems that I can't figure out are:
It doesn't work with debug
Most importantly it doesn't work with 32 bit which is most for me.
How can I obtain it?@Thank-You
Now after installing another version of openssl it is working on 64bit.
I couldn't make it work in 32bit.
And I found that many websites doesn't considered it as supported version.
I found that we can embed existing application to QT application but has no idea.
Main purpose of this is to run services likegmail , google docs and other servuces
.
Which would be good?
I was just searching abt this yesterday and found about running application. Could you give links of working docs about this?I will create new question abt this
-
@Thank-You
Now after installing another version of openssl it is working on 64bit.
I couldn't make it work in 32bit.
And I found that many websites doesn't considered it as supported version.
I found that we can embed existing application to QT application but has no idea.
Main purpose of this is to run services likegmail , google docs and other servuces
.
Which would be good?
I was just searching abt this yesterday and found about running application. Could you give links of working docs about this?I will create new question abt this
@Thank-You said in Using QWebkit for windows with mingw:
And I found that many websites doesn't considered it as supported version.
Web engines are very difficult to maintain because of security requirements. That is why the Qt Project replaced Qt WebKit (which was mostly maintained by the Qt folks) with Qt WebEngine (which is mostly maintained by the Chromium folks).
@Konstantin-Tokarev has done a great job making Qt WebKit compatible with recent versions of Qt, but the last update was over 1 year ago. Lots of security vulnerabilities have been discovered in WebKit since then; that is why many websites don't consider it as a supported version.
Main purpose of this is to run services like
gmail , google docs and other servuces
.
Which would be good?Qt WebEngine for desktop platforms; Qt WebView for mobile platforms.