[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    Re: [PyQt] Re: KIntNumInput question
From:       Jim Bublitz <jbublitz () nwinternet ! com>
Date:       2008-12-22 0:39:00
Message-ID: 200812211639.01027.jbublitz () nwinternet ! com
[Download RAW message or body]

On Sunday 21 December 2008 14:22:03 pm Neal Becker wrote:
> Jim Bublitz wrote:
> > On Sunday 21 December 2008 07:40:25 am Neal Becker wrote:
> >>         num_in = KIntNumInput (self, 0, 0, 16)
> >>
> >> gives:
> >> TypeError: too many arguments to KIntNumInput(), 1 at most
> >> expected
> >>
> >> But according to
> >> http://api.kde.org/pykde-4.1-api/kdeui/KIntNumInput.html#obj175289
> >>196
> >>
> >> There are constructors taking 1,2, and 3 args.  What am I missing?
> >> Is there some other doc I should be looking at?
> >
> > The docs you linked are a little confusing. If you were calling
> > __init__ directly, you'd pass 'self'. But since you're calling the
> > constructor instead, the 'self' argument isn't used.
> >
> > Since KIntNumInput is ultimately a subclass of QWidget, sip appears
> > to be choosing the single argument constructor - KIntNumInput
> > (QWidget), where the QWidget is 'self', and for that constructor
> > only a single argument is passed.
> >
> > If you drop the 'self' argument, it should work.
> >
> > Seems like the docs should show you how to put together a
> > constructor properly.
> >
> > Jim
>
>         num_in = KIntNumInput (0, 0, 16)
> TypeError: argument 2 of KIntNumInput() has an invalid type

Can't help you there - I don't have PyKDE4 installed. A short example 
program would help someone else test it.

The only thing I'd suggest is to try passing 'None' for the 2nd 
(QWidget) argument.

Jim
_______________________________________________
PyQt mailing list    PyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic