History: Setting Up An Application - QtCreator
Source of version: 9
Copy to clipboard
{DIV(class="Layout_box6")}{SPLIT(colsize=15%|85%)}{img fileId="1919"}---
{DIV(class="bigBold")}Setting Up An Application With QtCreator{DIV}{SPLIT}
{DIV}
%clear%
!Introduction
This set of instructions will walk you through setting up a QtCreator C++ project from scratch.
When you have finished this tutorial you will be able to compile a working Ogre Application and you will be ready to start the ((Basic Tutorials)).
{maketoc}
!Prerequisites
Get QtCreator from Qt.Nokia.
Get the [http://qt.nokia.com/downloads|stable version] or [ftp://ftp.trolltech.com/qtcreator/snapshots/latest|the latest snapshot].
!New Project
Click New Project in the start screen, and choose Other Project - Empty project.
{img fileId="1909"}
Give it a name and a place:
{img fileId="1910"}
Add files:
{img fileId="1911"}
Files added:
{img fileId="1907"}
Options:
{img fileId="1908"}
Qt4 Settings:
{img fileId="1912"}
Edit project file:
{img fileId="1913"}
{CODE(wrap="1", colors="qmake")}
TEMPLATE = app
TARGET = OgreQtProject
DEFINES -= UNICODE
CONFIG -= qt
unix {
# You may need to change this include directory
INCLUDEPATH += /usr/include/OGRE
CONFIG += link_pkgconfig
PKGCONFIG += OGRE
}
win32 {
LIBS *= user32.lib
LIBS += -L$(OGRE_HOME)\\boost\\lib
release:LIBS += -L$(OGRE_HOME)\\lib\\release
debug:LIBS += -L$(OGRE_HOME)\\lib\\debug
INCLUDEPATH += $(OGRE_HOME)\\include
INCLUDEPATH += $(OGRE_HOME)\\include\\OIS
INCLUDEPATH += $(OGRE_HOME)\\include\\OGRE
INCLUDEPATH += $(OGRE_HOME)\\boost
}
debug {
TARGET = $$join(TARGET,,,d)
LIBS *= -lOgreMain_d -lOIS_d
}
release:LIBS *= -lOgreMain -lOIS
HEADERS += \
TutorialApplication.h \
BaseApplication.h
SOURCES += \
TutorialApplication.cpp \
BaseApplication.cpp
{CODE}
Build All:
{img fileId="1914"}
Build Configuration:
{img fileId="1918"}
Custom Process Step settings:
{img fileId="1915"}
Run Settings:
{img fileId="1917"}
New Run Configuration:
{img fileId="1916"}
!Tutorial Framework
Tutorial Framework:
{img fileId="1657" width="400" thumb="y" alt="" rel="box"}
Download the ((Ogre Wiki Tutorial Framework)) here:
{ATTACH(id="61", page="Ogre Wiki Tutorial Framework",icon="1")}{ATTACH}
!Project Configuration
{TRANSCLUDE(page="seebox")}
[http://blog.codeimproved.net/2009/12/qtcreator-tips-and-tricks/|QtCreator Tips and Tricks]
{TRANSCLUDE}