[PyQt] qmlRegisterType limited to 20 Classes?

Detlev Offenbach detlev at die-offenbachs.de
Tue Nov 12 18:00:56 GMT 2013



On Tuesday 12 November 2013, 17:27:42 Phil Thompson wrote:
> On Tue, 12 Nov 2013 12:36:21 +0100, raskolnikov at es.gnu.org wrote:
> >> While being glad of having the possibility to use qmlRegisterType,
> >> I now ran into the following lines of "hard limitation". Since I found
> >> it nowhere in the documentation that there is any maximum amount of
> >> classes available to the C interface, I'm now kind of stuck in the
> >> middle of translating our laboratory framework to a qml-based gui.
> >> 
> >> qpy/QtQml/qpyqml_register_type.cpp:
> >> "a maximum of %d types may be registered with QML", NrOfTypes);
> >> qpy/QtQml/qpyqml_register_singleton_type.cpp:
> >> "a maximum of %d singleton types may be registered with QML",
> >> qpy/QtQuick/qpyquickitem.cpp:
> >> "a maximum of %d QQuickItem types may be registered with QML",
> >> qpy/QtQuick/qpyquickpainteditem.cpp:
> >> "a maximum of %d QQuickPaintedItem types may be registered with 
QML",
> >> 
> >> Is there going to be dynamic allocation to solve this problem?
> > 
> > I just stepped on this recently and I figured out that it is actually
> > PyQt's limitation. I guess the solution is not trivial, since Qt's
> > registers types via a template, so there must be a predefined number 
of
> > precompiled slots.  I also think 20 types is too limited, and while in
> 
> my
> 
> > code I could work around this, it would be nice to at least increase
> 
> this
> 
> > number at configure/compile time.
> 
> The current limits are arbitrary. What would be a sensible limit for you?
> 

Why not use a list and don't have a limit at all?

Detlev
-- 
*Detlev Offenbach*
detlev at die-offenbachs.de
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20131112/ac31f78d/attachment.html>


More information about the PyQt mailing list