This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
qt [2014/11/24 01:14] 0.0.0.0 created |
qt [2014/11/24 02:18] ben |
||
---|---|---|---|
Line 1: | Line 1: | ||
====== Qt ====== | ====== Qt ====== | ||
- | = Other Qt Pages = | + | ===== Other Qt Pages ===== |
* [[QtEnums]] | * [[QtEnums]] | ||
* For undocumented features of qmake, including SUBDIR projects with proper dependency hierarchies: | * For undocumented features of qmake, including SUBDIR projects with proper dependency hierarchies: | ||
- | = Compiling Qt under (k)ubuntu = | + | ===== Compiling Qt under (k)ubuntu |
* Download and extract Qt | * Download and extract Qt | ||
- | * Use <source lang="bash"> | + | * Use <code bash"> |
* openssl | * openssl | ||
* libssl-dev | * libssl-dev | ||
Line 14: | Line 14: | ||
* build-essential | * build-essential | ||
* Configure with the following line | * Configure with the following line | ||
- | <source lang="bash"> | + | <code bash> |
./configure -no-phonon -no-webkit -no-opengl -openssl | ./configure -no-phonon -no-webkit -no-opengl -openssl | ||
- | </source> | + | </code> |
* Build and install with the commands | * Build and install with the commands | ||
- | <source lang="bash"> | + | <code bash> |
(g)make install | (g)make install | ||
sudo (g)make install | sudo (g)make install | ||
- | </source> | + | </code> |
===== Building a minimal set of libraries only ===== | ===== Building a minimal set of libraries only ===== | ||
If you only want the Qt libraries, and none of the tools or examples, you can save time by using the following command lines | If you only want the Qt libraries, and none of the tools or examples, you can save time by using the following command lines | ||
- | <source lang="bash"> | + | <code bash> |
./configure -no-phonon -no-webkit -no-opengl -openssl -nomake examples -nomake demos | ./configure -no-phonon -no-webkit -no-opengl -openssl -nomake examples -nomake demos | ||
(g)make | (g)make | ||
sudo (g)make install | sudo (g)make install | ||
- | </source> | + | </code> |
- | = Compiling Qt under Windows/ | + | ===== Compiling Qt under Windows/ |
* Download and extract Qt to C: | * Download and extract Qt to C: | ||
Line 38: | Line 38: | ||
* For Phonon support, download and install the full DirectX SDK (at time of writing, November 2007 release) | * For Phonon support, download and install the full DirectX SDK (at time of writing, November 2007 release) | ||
* Set the following environment variables | * Set the following environment variables | ||
- | <source lang="bash"> | + | <code bash> |
OPENSSL_PATH = C: | OPENSSL_PATH = C: | ||
PATH += C: | PATH += C: | ||
QMAKESPEC = win32-msvc2005 | QMAKESPEC = win32-msvc2005 | ||
- | </source> | + | </code> |
* Run a platform sdk command prompt (The yellow one) | * Run a platform sdk command prompt (The yellow one) | ||
* For Phonon support, execute the DirectX environment script | * For Phonon support, execute the DirectX environment script | ||
- | <source lang="bash"> | + | <code bash> |
C:\Program Files\Microsoft DirectX SDK (November 2007)\Utilities\Bin\dx_setenv.cmd | C:\Program Files\Microsoft DirectX SDK (November 2007)\Utilities\Bin\dx_setenv.cmd | ||
- | </source> | + | </code> |
* Configure with the following command lines | * Configure with the following command lines | ||
- | <source lang="bash"> | + | <code bash> |
cd c: | cd c: | ||
configure.exe -debug-and-release -phonon -webkit -direct3d -openssl -I C: | configure.exe -debug-and-release -phonon -webkit -direct3d -openssl -I C: | ||
- | </source> | + | </code> |
Check the beginning of the output of configure, and ensure all selected options have been correctly enabled) | Check the beginning of the output of configure, and ensure all selected options have been correctly enabled) | ||
* Compile with the following command line | * Compile with the following command line | ||
- | <source lang="bash"> | + | <code bash> |
nmake | nmake | ||
- | </source> | + | </code> |
===== Improved Debugging output ===== | ===== Improved Debugging output ===== | ||
* Find the autoexp.dat file within the visual studio installation directory and add the following lines just before the [[Visualiser]] section | * Find the autoexp.dat file within the visual studio installation directory and add the following lines just before the [[Visualiser]] section | ||
- | <source lang="text"> | + | <code text> |
; Qt Integration | ; Qt Integration | ||
QObject =classname=< | QObject =classname=< | ||
Line 85: | Line 85: | ||
QFont =family=< | QFont =family=< | ||
QDomNode =name=< | QDomNode =name=< | ||
- | </source> | + | </code> |
- | = Making a project with qmake = | + | ===== Making a project with qmake ===== |
* Create a new project file with the following commandline | * Create a new project file with the following commandline | ||
- | <source lang="bash"> | + | <code bash> |
qmake -project -t app -o projectname.pro | qmake -project -t app -o projectname.pro | ||
- | </source> | + | </code> |
(In the current version of qmake, the template does not always get correctly applied, it can be fixed with the template below). | (In the current version of qmake, the template does not always get correctly applied, it can be fixed with the template below). | ||
- | <source lang="text"> | + | <code text> |
- Visual Studio 2005 template | - Visual Studio 2005 template | ||
TEMPLATE = app | TEMPLATE = app | ||
Line 114: | Line 114: | ||
HEADERS += main.h | HEADERS += main.h | ||
SOURCES += main.cpp | SOURCES += main.cpp | ||
- | </source> | + | </code> |
===== Creating the Visual Studio project files ===== | ===== Creating the Visual Studio project files ===== | ||
Once the .pro file is made, and indeed every time it is changed, use the following commandline to generate the Visual Studio project files | Once the .pro file is made, and indeed every time it is changed, use the following commandline to generate the Visual Studio project files | ||
- | <source lang="bash"> | + | <code bash> |
qmake -tp vc | qmake -tp vc | ||
- | </source> | + | </code> |
The project can then be opened in visual studio and compiled as ususal | The project can then be opened in visual studio and compiled as ususal |