[PyQt] ImportError QtWebEngineWidgets

Florian Bruhin me at the-compiler.org
Sat Aug 20 16:40:59 BST 2016


* Miguel Alejandro Fernández <alejandrogroso at hotmail.com> [2016-08-20 00:52:51 +0000]:
> in my application the next error is raised:
>     from PyQt5.QtWebEngineWidgets import QWebEngineView
>     ImportError: QtWebEngineWidgets must be imported before a
> QCoreApplication instance is created
> 
> It does not make sense to have this requirement !.
> How to be that this requirement is present?
> Is it a bug?

Well, I'm guessing there's a reason it's there! ;)

From the code:

// QtWebEngineWidgets uses Q_COREAPP_STARTUP_FUNCTION so, in order to make sure
// things work (particularly on Windows) when we dynamically load the code, we
// check things have been done in the right order.

Florian

-- 
http://www.the-compiler.org | me at the-compiler.org (Mail/XMPP)
   GPG: 916E B0C8 FD55 A072 | http://the-compiler.org/pubkey.asc
         I love long mails! | http://email.is-not-s.ms/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20160820/88c65f9d/attachment.sig>


More information about the PyQt mailing list