[Qtwebengine] Off-the-record QWebEngineProfiles

Florian Bruhin me at the-compiler.org
Wed May 24 18:53:07 CEST 2017


Hi,

On Wed, May 24, 2017 at 09:51:00AM -0600, Akkana Peck wrote:
> Florian had wondered:
> | 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.
> 
> It did seem unusual that adding "None" as a second argument
> argument would be required to make the first argument work -- that
> the optional argument would be the first one, not the second. Not
> sure I've ever seen that before in a Python API.

The Python API just mirrors the Qt one, and every QObject has "parent"
as last argument.

> I don't know how hard it would be to make the Python bindings smarter
> about choosing which overload to use, or perhaps to make profile a
> keyword argument (I did try QWebEnginePage(profile=self.profile)
> first, but it didn't accept it since profile isn't a keyword
> argument). But that's a question for whoever does the Python bindings.

Yeah, that'd be something for this mailinglist instead:
https://www.riverbankcomputing.com/mailman/listinfo/pyqt

However, that'd collide with how keyword arguments are used already:
http://pyqt.sourceforge.net/Docs/PyQt5/qt_properties.html

> It would definitely be something to note in the documentation,
> though, if there's ever going to be documentation written for
> the Python version of QtWebEngine. Who does the Python documentation?
> Is that something I could help with? (Once I understand it better,
> anyway.)

PyQt doesn't have any dedicated documentation really. PyQt wraps over
1000 classes. Translating all Qt documentation to Python (and, more
importantly, keeping it synchronized with all Qt doc changes) would be a
massive effort, with a relatively small benefit.

Florian

-- 
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/a0d6a868/attachment.sig>


More information about the QtWebEngine mailing list