[root@dywHome2 ~]# urpmi libqt3-devel To satisfy dependencies, the following packages are going to be installed: libqt3-3.3.6-18.4mdv2007.0.i586 libqt3-devel-3.3.6-18.4mdv2007.0.i586 qt3-common-3.3.6-18.4mdv2007.0.i586 Proceed with the installation of the 3 packages? (16 MB) (Y/n) # urpmi 會自動將相關相依套件一併安裝
[root@dywHome2 ~]# echo $QTDIR /usr/lib/qt3/
[dywang@dywOffice ~]$ ll /usr/bin/designer-qt3 lrwxrwxrwx 1 root root 30 Jan 14 10:48 /usr/bin/designer-qt3 -> ../../usr/lib/qt3/bin/designer* [dywang@dywOffice ~]$ designer-qt3
#include <qapplication.h> #include <qmainwindow.h> int main(int argc, char **argv) { QApplication app(argc, argv); QMainWindow window(); app.setMainWidget(window); window.show(); return app.exec(); }
$ g++ -o qt1 qt1.cpp -I$QTDIR/include -L$QTDIR/lib -lqt-mt
$ ./qt1