Probably moc is not liking this. Why not just make two complete but separate versions of the class and put your #ifndef-else statement entirely around the one using QT instead of just the first two lines? I think that way moc would be happier and it's not like at compile time the second class is created anyway.
Bookmarks