videowidget.h includes <QWidget>, phonon-4.6.0 included <QtGui/QWidget>. As configure.py in PyQt4 seems to not add includes/qt4/QtGui to the includedirs this breaks detection of phonon, hence will never build the python module. Downstream report: https://bugs.gentoo.org/show_bug.cgi?id=433944 Reproducible: Always
Any progress here? Re-Assigning to "kde-bindings" is IMHO useless, as PyQt4 is no kde-product. They stick to phonon supplied with Qt, and there is the #include <QtGui/QWidget>: http://qt.gitorious.org/qt/qt/blobs/4.8/src/3rdparty/phonon/phonon/videowidget.h Even in the qtphonon-repo (Qt5) there is no plain "#include <QWidget>" but <QtWidgets/QWidget>: http://qt.gitorious.org/qt/qtphonon/blobs/master/src/3rdparty/phonon/phonon/videowidget.h Nevertheless, as mentioned in the gentoo-bug, the mediaobject.sip shipped with PyKDE4 is completely outdated (or buggy) - e.g. it does not contain a MediaObject-constructor. This should be fixed nevertheless. But this won't fix building of PyQt4. And grepping through the phonon-sources (kde), there are many includes in the style of <QtModule/header>. If you want I can create a patch that changes all includes, so that PyQt4 finally builds phonon, again.
I asked Phil Thompson (PyQt4 developer) and I got a quite clear answer: Sorry but KDE's phonon isn't supported by PyQt so I'm not going to implement workarounds for problems with it.
This is more of a Phonon problem than a kdebindings one, even though I'm not sure there's much the Phonon team can do since commit b51f5bf2 seems to be needed for the Qt5 support. It's sad that PyQt is consciously only supporting an ancient version of Phonon, though. On FreeBSD, instead of adding QtGui to PyQt's path when building the Phonon program, I've instead used a different header that has compatible includes in it.
How is it a phonon problem that pyqt doesn't manage to add the qtgui includes when including a qwidget derivate? Oo
Created attachment 83567 [details] inject phonon include dirs from 'pkg-config --cflags-only-I phonon' output Here's a quick-n-dirty patch I came up with to inject extra phonon-related includes in configure.py. I borrowed from the dbusincdirs code in configure.py, though likely there are cleaner/easier ways to do it.
Created attachment 83570 [details] another try to inject 'pkg-config --cflags-only-I phonon' flags This version is python3 friendly
The logic looks fine, although indeed there might be a better way to get these includes.
If the idea is to patch PyQt itself, something like this is less intrusive: @@ -371,8 +371,8 @@ check_module("QtTest", "QtTest", "QTest::qSleep(0)") check_module("QtWebKit", "qwebpage.h", "new QWebPage()") check_module("QtXmlPatterns", "qxmlname.h", "new QXmlName()") - check_module("phonon", "phonon/videowidget.h", - "new Phonon::VideoWidget()") + check_module("phonon", "phonon/mediacontroller.h", + "new Phonon::MediaController(0)") check_module("QtAssistant", "qassistantclient.h", "new QAssistantClient(\"foo\")", extra_lib_dirs=ass_lib_dirs, extra_libs=ass_libs)
We have this now in openSUSE: @@ -1278,6 +1278,8 @@ def compile_qt_program(name, mname, extr qt = [mname] if mname in ("QtAssistant", "QtHelp", "QtOpenGL", "QtWebKit"): qt.append("QtCore") + if mname in ("phonon"): + qt.append("QtGui")
could have sworn I'd tried that approach (in comment #9), but must've done it wrong. I concur it is a better and simpler way to solve the problem.
Thank you for the bug report. As this report hasn't seen any changes in 5 years or more, we ask if you can please confirm that the issue still persists. If this bug is no longer persisting or relevant please change the status to resolved.