Leuven, E. wrote:
> i would like to have another implementation for IconPalette for qt version 
> 4.2 and higher, and am wondering how to do this.
> 
> now i have the code below in the header file but the compiler doesn't seem to 
> like it.
> 
> perhaps someone can tell me the way to do this?
> 
> thanks!
> 
> 
> # if QT_VERSION >= 0x040200
> 
> class IconPalette : public QWidgetAction {
>  ...
> };
> 
> # else
> 
> class IconPalette : public QWidget {
>  ...
> };
> 
> # endif // QT_VERSION >= 0x040200
> 

http://lists.trolltech.com/qt-interest/2006-05/thread00319-0.html
http://lists.trolltech.com/qt-interest/2000-10/msg00401.html

A solution would be to have two header files, and to include the header
and moc file in a #if block.

Peter

Reply via email to