Solved Trying to render a website on my program..
-
@U7Development said in Trying to render a website on my program..:
QT += core gui sql webengine
As shown in the documentation (https://doc.qt.io/qt-5/qwebengineview.html) it needs to be
QT += core gui sql webenginewidgets
-
Thanks for answering...
When i include that module i receive the error that the module is unknown... -
@U7Development Which Qt version did you install and how?
-
@jsulm i have installed 5.14 on Debian
Selected then the following items before installing:
Qt creator
Gcc kit
Sources
Qt webEngine -
@U7Development Then your users could simply do the same.
-
@jsulm excuse me, i did not get that..
-
@U7Development I think my last reply was meant for another thread, sorry :-)
Did you install Web Engine? It is not installed by default when using online installer. Start Qt Maintenance Tool and select Web Engine. -
@jsulm oh ok..
Yes, webengine is checked before installing it...
Im going to make a Windows test .. -
-
I have returned here to say that i have solved it...!!
Just looked into the built in examples a very basic but working example and works!This is what i did (for someone else that want to make it work)
-
Installed QtWebEngine from installer
-
on the .pro file, add webenginewidgets:
QT += core gui sql webenginewidgets (was my case) -
on wprincipal.ui added a Widget type container to hold the website (i named it wdgtWeb)
-
added pointer of type QWebEngineView to window widget header (wprincipal.h) in my case :
class QWebEngineView (forwarding)
private:
QWebEngineView* minsal_web {nullptr};-
#include <QWebEngineView> on wprincipal.cpp
-
add these lines in somewhere you initialize your program (or in the constructor):
minsal_web = new QWebEngineView;
minsal_web->setParent(ui->wdgtWeb);
minsal_web->setFixedSize(QSize(1021, 701));
minsal_web->setUrl(QUrl(QStringLiteral("https://www.minsal.cl")));
minsal_web->show();Point Nº 2 is the same as @jsulm said, for some reason now is getting fine... still don't get why...
but for sure, the Point Nº 5 is different than i was writing, so that helped too. -