#ifdef and moc

F@lk Brettschneider falk.brettschneider at gmx.de
Sun Jun 2 16:53:27 BST 2002


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

Ciao
F at lk



-
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