Re: Problems with PyQtWebEngine on Mac
Davide Liessi <[email protected]>
| Newsgroups | gmane.comp.python.pyqt-pykde |
|---|---|
| Message-ID | <CAOXn3brAvLRfi4t1wvxP4iG8RuY6iajR_aFKgDkybzQUr7AxyA@mail.gmail.com> |
Il giorno mar 25 feb 2020 alle ore 11:48 Davide Liessi <[email protected]> ha scritto: > Consider the attached example: "test" is the main application, > "app.py" is the py2app script, "build-app.sh" automates some manual > steps (see later). Maybe the attachments didn't survive: their content follows. Sorry for the inconvenience. Davide --- test: # minimal QWebEngine example. from PyQt5.QtWidgets import QApplication from PyQt5.QtWebEngineWidgets import QWebEngineView from PyQt5.QtCore import QUrl app = QApplication( [] ) view = QWebEngineView() view.load( QUrl( "https://www.riverbankcomputing.com/software/pyqt/intro" ) ) view.show() app.exec_() --- app.py: from setuptools import setup setup( app = ['test'], name = 'test', setup_requires = ['py2app'], ) --- build-app.sh: #!/usr/bin/env bash PYTHON="/opt/local/bin/python3.7" QTROOT='/opt/local/libexec/qt5' ${PYTHON} app.py APPBUNDLE=dist/test.app rm ${APPBUNDLE}/Contents/Resources/qt.conf mkdir -p ${APPBUNDLE}/Contents/PlugIns/platforms cp ${QTROOT}/plugins/platforms/libqcocoa.dylib ${APPBUNDLE}/Contents/PlugIns/platforms/ ${QTROOT}/bin/macdeployqt ${APPBUNDLE} ln -s Versions/5/Helpers ${APPBUNDLE}/Contents/Frameworks/QtWebEngineCore.framework/Helpers ln -s Versions/5/QtWebEngineCore ${APPBUNDLE}/Contents/Frameworks/QtWebEngineCore.framework/QtWebEngineCore ln -s Versions/5/Resources ${APPBUNDLE}/Contents/Frameworks/QtWebEngineCore.framework/Resources _______________________________________________ PyQt mailing list [email protected] https://www.riverbankcomputing.com/mailman/listinfo/pyqt