The QextMDI Handbook: KDE2 mode and Qt mode

Next Previous Table of Contents

### 6. Using QextMDI for KDE2 applications and for Qt-2.x applications

QextMDI can be used for 2 different developer systems. It only depends on the way you have compiled QextMDI. As result of your compilation you will get either a QextMDI library that is linked with Qt only or which is linked with Qt and the KDE2 library libkdeui.so (the GUI extension library of KDE2).

In case of a QextMDI linked against Qt all QextMDI classes bases on Qt, only. The mainframe class QextMdiMainFrm is a special QMainWindow, the MDI-view taskbar class QextMdiTaskBar is a special QToolBar and the application object of your program (which uses QextMDI) will base on QApplication. A pure Qt application so to speak.

But if you have QextMDI compiled for KDE2, it will mean QextMdiMainFrm is a special KMainWindow, QextMdiTaskBar is a special KToolBar and the application object of the program which uses our MDI library has to inherit the class KApplication. In that state QextMDI is a full KDE2-based library, it uses the GUI controls of KDE and will look like a KDE2 application.

How can I compile QextMDI for the different modes?

QextMDI for Qt only | QextMDI for KDE2
cd $(QEXTMDIDIR) | Change to the QextMDI directory
./configure | Generate the Qt Makefiles (examples, too) It actually calls: tmake qextmdi.pro -o Makefile tmake fourChildren.pro -o Makefile tmake mdiframework.pro -o Makefile
cd qextmdi |
make clean | Clean from temp. files
make | Compile the library and the examples
cd $(QEXTMDIDIR) | Change to the QextMDI directory
./configure -kde2 | Generate the KDE2 Makefiles (examples, too) It actually calls: tmake kextmdi.pro -o Makefile tmake kFourChildren.pro -o Makefile tmake kmdiframework.pro -o Makefile
cd qextmdi |
make clean | Clean from temp. files
make | Compile the library and the examples

Note:
If you compile QextMDI as KDE2-depending library, your application has to use KMainWindow. It is not possible to use such a QextMDI for Qt-only applications.
Next Previous Table of Contents