[Qtwebengine] Off-the-record QWebEngineProfiles

Florian Bruhin me at the-compiler.org
Wed May 24 06:50:54 CEST 2017

Hey Akkana,

On Tue, May 23, 2017 at 07:58:45PM -0600, Akkana Peck wrote:
>     self.page = QWebEnginePage(self.profile)

The QWebEnginePage constructor has two overloads:

    QWebEnginePage(QObject *parent = Q_NULLPTR)
    QWebEnginePage(QWebEngineProfile *profile, QObject *parent = Q_NULLPTR)

Since a QWebEngineProfile is a valid QObject, and you don't pass a
second argument, the first one gets selected - i.e. you get the default
profile, and your profile as a parent object for the page.

If you pass self.webview as a second argument, all works like intended.

This makes me wonder if C++ handles this differently though - does it
select the second overload because it's a more specific match? If it
does, this might be a "bug" in how PyQt selects which overload to run.


https://www.qutebrowser.org  | me at the-compiler.org (Mail/XMPP)
   GPG: 916E B0C8 FD55 A072  | https://the-compiler.org/pubkey.asc
         I love long mails!  | https://email.is-not-s.ms/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.qt-project.org/pipermail/qtwebengine/attachments/20170524/56b4adb0/attachment.sig>

More information about the QtWebEngine mailing list