[Qt-interest] SPAM-LOW: Re: QT 4.5 OS X Compile errors

Murphy, Sean M. sean.murphy at gd-ais.com
Wed Sep 23 22:05:40 CEST 2009


> I keep seeing "-no-qt3support" in some solutions on Mac, perhaps this
> is necessary since I have had Qt 3 installed on this machine prior?

No, the "-no-qt3support" flag has nothing to do with whether you had the
Qt 3 libraries installed on the machine prior, it has everything to do
with trying to use Qt 4 to build code you had previously built under Qt
3, without having to do a full port of your code to Qt 4.

For example, Qt 3 had the classes QCanvas and QCanvasView, but Qt 4 does
not.  Similar functionality exists in Qt 4 with the QGraphicsScene and
QGraphicsView classes, except that the Qt 4 versions have completely
different function names.  So you can't just do a find/replace of
QCanvas with QGraphicsScene and have it compile.  The Qt 3 Support
libraries includes classes called Q3Canvas and Q3CanvasView, which are
functionally identical to their Qt 3 versions, so to port your code from
Qt 3 to Qt 4, you'd do a find/replace of QCanvas/Q3Canvas and
QCanvasView/Q3CanvasView, etc.  Then you'd link the Qt3Support library
in and your code should run correctly...

If you build Qt 4 with "-no-qt3support", the Qt3Support library never
gets built, so you can't build your old Qt 3 code under Qt 4.  Which
means you'd really have to port your code to Qt 4 to get it to build
under Qt 4 only.  

Sean




More information about the Qt-interest-old mailing list