[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    Re: [PyQt] Problems with PyQtWebEngine on Mac
From:       Davide Liessi <davide.liessi () gmail ! com>
Date:       2020-02-25 10:53:40
Message-ID: CAOXn3brAvLRfi4t1wvxP4iG8RuY6iajR_aFKgDkybzQUr7AxyA () mail ! gmail ! com
[Download RAW message or body]

Il giorno mar 25 feb 2020 alle ore 11:48 Davide Liessi
<davide.liessi@gmail.com> 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    PyQt@riverbankcomputing.com
https://www.riverbankcomputing.com/mailman/listinfo/pyqt

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic