pyqt / python-qt5

Unofficial PyQt5 via PyPI for Python 2.7 64-bit on Windows
GNU General Public License v3.0
280 stars 78 forks source link

Support for QtWebEngineWidgets in Windows PyQt5 #21

Open jacksonofalltrades opened 8 years ago

jacksonofalltrades commented 8 years ago

Hi, It seems that this may only be available in Qt5.6 or later, but I haven't completely determined that. This module seems to be completely missing when I try to build my Windows app using your python-qt5. Any guidance on this? Thanks!

mottosso commented 8 years ago

Hm, looking at the docs, it looks like it's been there since 5.4.

But it's possible it didn't get included in the build for this project. This is how the project has been built, maybe there's a flag that could've/should've been set in order to build this?

I think it has a different license then the rest of Qt, not sure if it's related.

These are the possible build flags.

martinpengellyphillips commented 7 years ago

For reference, this is what I had to do to get this working in a Virtualenv:

  1. pip install git+git://github.com/pyqt/python-qt5.git
  2. mv /path/to/virtualenv/qt.conf /path/to/virtualenv/Scripts
  3. Edit /path/to/virtualenv/Scripts/qt.conf to contain following:
    [Paths]
    Prefix = ../Lib/site-packages/PyQt5
    Binaries = ../Lib/site-packages/PyQt5
  4. Copy /path/to/virtualenv/Lib/site-packages/PyQt5QtWebEngineProcess.exe and /path/to/virtualenv/Lib/site-packages/PyQt5QtWebEngineProcessd.exe to /path/to/virtualenv/Scripts directory.
  5. Download PyQt5 5.71 wheel for Python 3 from https://pypi.python.org/pypi/PyQt5/5.7.1 and extract.
  6. Copy resources and translations from the extracted wheel (\PyQt5\Qt) to /path/to/virtualenv/Lib/site-packages/PyQt5

Et voila. I was able to load a web page in QWebEnginePage

Note: Theoretically, adding LibraryExecutables = ../Lib/site-packages/PyQt5 to qt.conf should negate the need for copying the executables to Scripts, but it didn't work for me.