[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-devel
Subject: Re: KTitleWidget *titleWidget error
From: "dave selby" <dave6502 () googlemail ! com>
Date: 2007-07-29 20:26:41
Message-ID: f52017b60707291326q21c47224if9f290004ded742f () mail ! gmail ! com
[Download RAW message or body]
On 29/07/07, Thomas McGuire <thomas.mcguire@gmx.net> wrote:
> Hi,
>
> On Sunday 29 July 2007, dave selby wrote:
> > I am trying to define a private prototype KTitleWidget pointer ie ...
> >
> > private:
> >
> > // Widgets.
> >
> > KTitleWidget *titleWidget;
> > QLabel* labUser;
> > QLineEdit* leUser;
> > ....
> >
> > I keep getting the following error ...
> >
> > /home/dave/kde/src/4.0/KDE/kdeadmin/kcron/kttask.h:144: error: ISO C++
> > forbids declaration of 'KTitleWidget' with no type
> > /home/dave/kde/src/4.0/KDE/kdeadmin/kcron/kttask.h:144: error:
> > expected ';' before '*' token
> >
> > Can ayone help ?
> Did you include the KTitleWidget header?
> You need to add
> #include <ktitlewidget.h>
> to your includes.
You got it, didn't see that and the error seemed a bit ... obtuse ... thanks :)
>
> Actually, in your header it is better to just use a forward declaration to
> reduce compile time. Just add
> class KTitleWidget;
> before you declare the class in which KTitleWidget is used. In this case, you
> still need to include the KTitleWidget header file in your cpp file.
>
> But maybe you already considered this and this is another error :)
>
OK I will look into that -:), just read a book on C++ & QT4 but still
have a ton to learn
Dave
> Hope that helps,
> Thomas
>
>
> >> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
>
--
Please avoid sending me Word or PowerPoint attachments.
See http://www.gnu.org/philosophy/no-word-attachments.html
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic