[PyQt] qmlRegisterType limited to 20 Classes?
Tobias Lausch
lausch at rhrk.uni-kl.de
Thu Nov 14 18:36:29 GMT 2013
Am Donnerstag, den 14.11.2013, 18:53 +0100 schrieb Detlev Offenbach:
>
> On Wednesday 13 November 2013, 20:02:22 Phil Thompson wrote:
> > On Wed, 13 Nov 2013 18:40:53 +0100, Detlev Offenbach
> >
> > <detlev at die-offenbachs.de> wrote:
> > > On Wednesday 13 November 2013, 16:37:31 Phil Thompson wrote:
> > >> On Wed, 13 Nov 2013 16:35:31 +0100, Tobias Lausch
> >
> > <lausch at rhrk.uni-kl.de>
> >
> > >> wrote:
> > >> > Hi There,
> > >> >
> > >> > approx. 50 but I would expect this limit to be breached in half a
> >
> > year
> >
> > >> > when nobody remembers that there has been such a limit.
> > >>
> > >> You should get an exception when the limit is reached.
> > >>
> > >> > Having no limit at all would be very nice.
> > >>
> > >> ...but not possible.
> > >
> > > Why that? Hardcoded array limits are always a bad idea. At work my
> > > developers
> > > are forced to explain the need for such a design.
> >
> > The problem is that C++ (unlike Python) doesn't allow you to create new
> > classes at runtime. QML types (as they are implemented as C++ classes) must
> > be defined at compile time. They are mapped to Python types at runtime.
> >
> > The fundamental problem is that QML is badly designed.
> >
>
> Thanks for this explanation. It is a valid reason for having a fixed limit. I
> would accept it even from my developers ;-)
>
> Detlev
k. Thanks from me too.
Maybe for the next release you could set nbrTypes by default to a higher
value. That would decrease the number of issues.
Tobias
More information about the PyQt
mailing list