#ifdef and moc

mh crapsite at gmx.net
Sun Jun 2 18:54:00 BST 2002


falk.brettschneider at gmx.de, Sonntag, 2. Juni 2002 17:53:
> mh wrote:
> >Hi,
> >I'm trying to bring one of my apps a little more in compliance with KDE,
> > i.e. the user can pass --enable-kde-app to configure and then
> > QApplication is replaced with KApplication to get at least the same style
> > like other KDE applications. Unfortunately, I can't use QMainWindow,
> > because the menubar isn't updated correctly.
> >
> >Now the problem:
> >When I try something like this
> >
> >#ifdef KDEAPP
> >class Bla : public KMainWindow
> >#elif
> >class Bla : public QMainWindow
> >#endif
> >{
> >  Q_OBJECT
> >...
> >
> >then the moc is simply to stupid to parse this correctly. How do I achieve
> >the same without getting syntax errors from the moc ?
>
> Take a look at the QextMDI project. It solves that problem in its sources.
> http://www.geocities.com/gigafalk/qextmdi.htm

Thanks for the hint, but in this case the solution was probably simpler: 
use a KMenuBar in the class derived from QMainWindow, then it gets correctly 
redrawn <:-) 

bb
Michael

-
to unsubscribe from this list send an email to kdevelop-request at kdevelop.org with the following body:
unsubscribe »your-email-address«



More information about the KDevelop mailing list