[Interest] Problem with QWebEngineView and QWebView

Koehne Kai Kai.Koehne at theqtcompany.com
Fri Apr 1 08:16:38 CEST 2016


> -----Original Message-----
> From: Interest [mailto:interest-
> bounces+kai.koehne=theqtcompany.com at qt-project.org] On Behalf Of
> Freddy Martinez
> Subject: [Interest] Problem with QWebEngineView and QWebView
> 
> [...]
> 1. How can I print a QWebEngineView content ?? with QWebView I only
> need to call the print method 

Printing with Chromium is surprisingly difficult to implement, but we aim to support
printing to PDF in Qt 5.7:

http://doc-snapshots.qt.io/qt5-5.7/qwebenginepage.html#printToPdf

>  2. Is there a signal for any clicked link ? in that
> case, what is it ?

Not directly. If the clicked link results in basically a new page being loaded ,
You can overwrite QWebEnginePage::acceptNavigationRequest

http://doc.qt.io/qt-5/qwebenginepage.html#acceptNavigationRequest

If you need more, you might want to inject a script that detects clicked links,
e.g. using jquery.

> I had bought a HTML template
> (http://wrapbootstrap.com/preview/WB0N89JMK) and I need to show
> exactly as I can see it on any web browser .
> 
> [...]
>
> in the URL, you can go to the menu Tables/Managed Tables/Responsive and
> you'll see that the filter and the button order on the header of each column
> is not there when I run the test with webview and is there when I use
> webengine... 

Not sure what goes wrong there. But Qt WebKit is deprecated, so I wouldn't
expect any new features there.

> another curious things is the output of qt-creator console,
> because when I use webview, qt-creat console output said:
> 
> 
> qt.network.ssl: QSslSocket: cannot resolve SSL_set_psk_client_callback
> qt.network.ssl: QSslSocket: cannot resolve TLSv1_1_client_method
> qt.network.ssl: QSslSocket: cannot resolve TLSv1_2_client_method
> qt.network.ssl: QSslSocket: cannot resolve TLSv1_1_server_method
> qt.network.ssl: QSslSocket: cannot resolve TLSv1_2_server_method
> qt.network.ssl: QSslSocket: cannot resolve SSL_select_next_proto
> qt.network.ssl: QSslSocket: cannot resolve
> SSL_CTX_set_next_proto_select_cb
> qt.network.ssl: QSslSocket: cannot resolve
> SSL_get0_next_proto_negotiated

That just means that Qt was trying to dynamically load the openssl
libs, and that they're older than the openssl verison it was compiled
against. Not something to worry about in general.

> so, where is my problem and what is the best way to fix it ?
> 
> regards
> 
> PD: I'm using OS X El Capitan and Qt 5.6.

Ah yes, the system openssl on OS X is hopelessly outdated. If you
feel like experimenting, you can configure/compile Qt anew, this
time with -securetransport .

Regards

Kai



More information about the Interest mailing list