Trolltech Home | Qt-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 2

Qt-interest Archive, March 2002
problem overriding compareItems


Message 1 in thread


<<< text/html: EXCLUDED >>>


Message 2 in thread

Hi,

could it be that your default constructor for class BaseBase ist private?

greetings,

P.J.

Am Mittwoch, 6. März 2002 20:52 schrieb james creasy:
> ive subclassed QPtrList:
>
>         class ObjectList : public QPtrList<BaseBase>
>
> however, when i add the constructor:
>
>         ObjectList::ObjectList()
>
>           :QPtrList<BaseBase>
>
>         {
>
>         }
>
> i get this error:
>
>         c:\pathway1\builder\diagramarea.cpp(9) : error C2248:
> 'ObjectList::ObjectList' : cannot access private member declared in class
> 'ObjectList'
>
> my question is, what private member am i trying to access?  and how do i
> fix it?
>
> (i am ultimately trying to over compareItems so i can sort on my own key)
>
> thanks,
>
> -james creasy
> Gene Network Sciences

-- 
 [ signature omitted ] 

Message 3 in thread

no, thats not it, but good idea!

        class BaseBase
        {
        public:
         BaseBase() {}

any other ideas, anyone?

-james creasy
Gene Network Sciences




----- Original Message -----
From: "P.J. Meisch" <pjmeisch@web.de>
To: <qt-interest@trolltech.com>
Sent: Wednesday, March 06, 2002 4:24 PM
Subject: Re: problem overriding compareItems


> Hi,
>
> could it be that your default constructor for class BaseBase ist private?
>
> greetings,
>
> P.J.
>
> Am Mittwoch, 6. März 2002 20:52 schrieb james creasy:
> > ive subclassed QPtrList:
> >
> >         class ObjectList : public QPtrList<BaseBase>
> >
> > however, when i add the constructor:
> >
> >         ObjectList::ObjectList()
> >
> >           :QPtrList<BaseBase>
> >
> >         {
> >
> >         }
> >
> > i get this error:
> >
> >         c:\pathway1\builder\diagramarea.cpp(9) : error C2248:
> > 'ObjectList::ObjectList' : cannot access private member declared in
class
> > 'ObjectList'
> >
> > my question is, what private member am i trying to access?  and how do i
> > fix it?
> >
> > (i am ultimately trying to over compareItems so i can sort on my own
key)
> >
> > thanks,
> >
> > -james creasy
> > Gene Network Sciences
>
> --
> ------------------------------------------
> P.J. Meisch
> pjmeisch@web.de
> ------------------------------------------
>
> --
> List archive and information: http://qt-interest.trolltech.com


Message 4 in thread

i fixed it.  i forgot the 'public:' in my derived class before the
constructor.  DOH!

-james

----- Original Message -----
From: "james creasy" <james@gnsbiotech.com>
To: <pjmeisch@web.de>; <qt-interest@trolltech.com>
Sent: Wednesday, March 06, 2002 5:01 PM
Subject: Re: problem overriding compareItems


> no, thats not it, but good idea!
>
>         class BaseBase
>         {
>         public:
>          BaseBase() {}
>
> any other ideas, anyone?
>
> -james creasy
> Gene Network Sciences
>
>
>
>
> ----- Original Message -----
> From: "P.J. Meisch" <pjmeisch@web.de>
> To: <qt-interest@trolltech.com>
> Sent: Wednesday, March 06, 2002 4:24 PM
> Subject: Re: problem overriding compareItems
>
>
> > Hi,
> >
> > could it be that your default constructor for class BaseBase ist
private?
> >
> > greetings,
> >
> > P.J.
> >
> > Am Mittwoch, 6. März 2002 20:52 schrieb james creasy:
> > > ive subclassed QPtrList:
> > >
> > >         class ObjectList : public QPtrList<BaseBase>
> > >
> > > however, when i add the constructor:
> > >
> > >         ObjectList::ObjectList()
> > >
> > >           :QPtrList<BaseBase>
> > >
> > >         {
> > >
> > >         }
> > >
> > > i get this error:
> > >
> > >         c:\pathway1\builder\diagramarea.cpp(9) : error C2248:
> > > 'ObjectList::ObjectList' : cannot access private member declared in
> class
> > > 'ObjectList'
> > >
> > > my question is, what private member am i trying to access?  and how do
i
> > > fix it?
> > >
> > > (i am ultimately trying to over compareItems so i can sort on my own
> key)
> > >
> > > thanks,
> > >
> > > -james creasy
> > > Gene Network Sciences
> >
> > --
> > ------------------------------------------
> > P.J. Meisch
> > pjmeisch@web.de
> > ------------------------------------------
> >
> > --
> > List archive and information: http://qt-interest.trolltech.com
>
> --
> List archive and information: http://qt-interest.trolltech.com