[PyQt] examples/docs for exposing custom Qt5 C++ widget through PyQt5
Phil Thompson
phil at riverbankcomputing.com
Mon Apr 28 09:13:40 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.
The current QScintilla snapshot has a refactored configure.py which is
about 80% boilerplate code and 20% an implementation of a
ModuleConfiguration class. The intent is that you copy this configure.py
and hack at the ModuleConfiguration class so that it meets your needs.
Phil
More information about the PyQt
mailing list