[PyQt] examples/docs for exposing custom Qt5 C++ widget through PyQt5

Phil Thompson phil at riverbankcomputing.com
Fri Apr 4 22:23:52 BST 2014


On 04-04-2014 8:45 pm, Erik Hvatum wrote:
> Hi All,
>
> Is there a recommended way to go about building a Qt5 C++ extension
> for PyQt5 that exposes a new widget to Python code?
>
> Writing the C++ code and SIP file is not a problem.
>
> Compiling the C++ code with qmake into a library is not a problem.
>
> But how do I build the PyQt5 stuff for it?  This was all very easy to
> do with PyQt4.  THE FUNCTIONALITY THAT MADE IT EASY TO DO,
> PYQTCONFIG, IS GONE FROM PYQT5.  HOWEVER, THE EXAMPLE IN THE SIP DOCS
> STILL RELIES ON PYQTCONFIG.
>
> Any advice more useful than "examine the 2575 line PyQt5 configure.py
> script" would be greatly appreciated.

More like lines 1 to 2575. I plan to rewrite the configure.py for 
QScintilla, PyQtChart etc (and relicense them to BSD) so that they are 
more usable and cut-and-pastable - but not just yet.

Phil


More information about the PyQt mailing list