Go back to Richel Bilderbeek's homepage.
Go back to Richel Bilderbeek's C++ page.
Hello Qt is an extension of Hello World.
Like Hello World, Hello Qt is a simple application.
Hello Qt, however, also requires the Qt
libraries.
Operating system: Ubuntu 10.04 LTS Lucid Lynx
IDE: Qt Creator 2.0.0
Project type: GUI application
Compiler: G++ 4.4.1
Libraries used:
Other tools:
#-------------------------------------------------
#
# Project created by QtCreator 2010-09-29T18:34:47
#
#-------------------------------------------------
QT += core gui
TARGET = CppHelloQt
TEMPLATE = app
SOURCES += main.cpp
|
main.cpp
Makefile
Copied from '/home/richel/.wine/drive_c/Qt/2010.05/ProjectsWin/CppHelloQt':
#############################################################################
# Makefile for building: CppHelloQt
# Generated by qmake (2.01a) (Qt 4.7.0) on: Thu Sep 30 13:42:17 2010
# Project: CppHelloQt.pro
# Template: app
# Command: c:\qt\2010.05\qt\bin\qmake.exe -spec ..\..\qt\mkspecs\win32-g++ -o Makefile CppHelloQt.pro
#############################################################################
first: debug
install: debug-install
uninstall: debug-uninstall
MAKEFILE = Makefile
QMAKE = c:\qt\2010.05\qt\bin\qmake.exe
DEL_FILE = del
CHK_DIR_EXISTS= if not exist
MKDIR = mkdir
COPY = copy /y
COPY_FILE = $(COPY)
COPY_DIR = xcopy /s /q /y /i
INSTALL_FILE = $(COPY_FILE)
INSTALL_PROGRAM = $(COPY_FILE)
INSTALL_DIR = $(COPY_DIR)
DEL_FILE = del
SYMLINK =
DEL_DIR = rmdir
MOVE = move
CHK_DIR_EXISTS= if not exist
MKDIR = mkdir
SUBTARGETS = \
debug \
release
debug: $(MAKEFILE).Debug FORCE
$(MAKE) -f $(MAKEFILE).Debug
debug-make_default: $(MAKEFILE).Debug FORCE
$(MAKE) -f $(MAKEFILE).Debug
debug-make_first: $(MAKEFILE).Debug FORCE
$(MAKE) -f $(MAKEFILE).Debug first
debug-all: $(MAKEFILE).Debug FORCE
$(MAKE) -f $(MAKEFILE).Debug all
debug-clean: $(MAKEFILE).Debug FORCE
$(MAKE) -f $(MAKEFILE).Debug clean
debug-distclean: $(MAKEFILE).Debug FORCE
$(MAKE) -f $(MAKEFILE).Debug distclean
debug-install: $(MAKEFILE).Debug FORCE
$(MAKE) -f $(MAKEFILE).Debug install
debug-uninstall: $(MAKEFILE).Debug FORCE
$(MAKE) -f $(MAKEFILE).Debug uninstall
release: $(MAKEFILE).Release FORCE
$(MAKE) -f $(MAKEFILE).Release
release-make_default: $(MAKEFILE).Release FORCE
$(MAKE) -f $(MAKEFILE).Release
release-make_first: $(MAKEFILE).Release FORCE
$(MAKE) -f $(MAKEFILE).Release first
release-all: $(MAKEFILE).Release FORCE
$(MAKE) -f $(MAKEFILE).Release all
release-clean: $(MAKEFILE).Release FORCE
$(MAKE) -f $(MAKEFILE).Release clean
release-distclean: $(MAKEFILE).Release FORCE
$(MAKE) -f $(MAKEFILE).Release distclean
release-install: $(MAKEFILE).Release FORCE
$(MAKE) -f $(MAKEFILE).Release install
release-uninstall: $(MAKEFILE).Release FORCE
$(MAKE) -f $(MAKEFILE).Release uninstall
Makefile: CppHelloQt.pro ../../qt/mkspecs/win32-g++/qmake.conf ../../qt/mkspecs/qconfig.pri \
../../qt/mkspecs/modules/qt_webkit_version.pri \
../../qt/mkspecs/features/qt_functions.prf \
../../qt/mkspecs/features/qt_config.prf \
../../qt/mkspecs/features/exclusive_builds.prf \
../../qt/mkspecs/features/default_pre.prf \
../../qt/mkspecs/features/win32/default_pre.prf \
../../qt/mkspecs/features/debug.prf \
../../qt/mkspecs/features/debug_and_release.prf \
../../qt/mkspecs/features/default_post.prf \
../../qt/mkspecs/features/win32/default_post.prf \
../../qt/mkspecs/features/win32/rtti.prf \
../../qt/mkspecs/features/win32/exceptions.prf \
../../qt/mkspecs/features/win32/stl.prf \
../../qt/mkspecs/features/shared.prf \
../../qt/mkspecs/features/warn_on.prf \
../../qt/mkspecs/features/qt.prf \
../../qt/mkspecs/features/win32/thread.prf \
../../qt/mkspecs/features/moc.prf \
../../qt/mkspecs/features/win32/windows.prf \
../../qt/mkspecs/features/resources.prf \
../../qt/mkspecs/features/uic.prf \
../../qt/mkspecs/features/yacc.prf \
../../qt/mkspecs/features/lex.prf \
../../qt/mkspecs/features/include_source_dir.prf \
c:/Qt/2010.05/qt/lib/qtmaind.prl
$(QMAKE) -spec ..\..\qt\mkspecs\win32-g++ -o Makefile CppHelloQt.pro
..\..\qt\mkspecs\qconfig.pri:
..\..\qt\mkspecs\modules\qt_webkit_version.pri:
..\..\qt\mkspecs\features\qt_functions.prf:
..\..\qt\mkspecs\features\qt_config.prf:
..\..\qt\mkspecs\features\exclusive_builds.prf:
..\..\qt\mkspecs\features\default_pre.prf:
..\..\qt\mkspecs\features\win32\default_pre.prf:
..\..\qt\mkspecs\features\debug.prf:
..\..\qt\mkspecs\features\debug_and_release.prf:
..\..\qt\mkspecs\features\default_post.prf:
..\..\qt\mkspecs\features\win32\default_post.prf:
..\..\qt\mkspecs\features\win32\rtti.prf:
..\..\qt\mkspecs\features\win32\exceptions.prf:
..\..\qt\mkspecs\features\win32\stl.prf:
..\..\qt\mkspecs\features\shared.prf:
..\..\qt\mkspecs\features\warn_on.prf:
..\..\qt\mkspecs\features\qt.prf:
..\..\qt\mkspecs\features\win32\thread.prf:
..\..\qt\mkspecs\features\moc.prf:
..\..\qt\mkspecs\features\win32\windows.prf:
..\..\qt\mkspecs\features\resources.prf:
..\..\qt\mkspecs\features\uic.prf:
..\..\qt\mkspecs\features\yacc.prf:
..\..\qt\mkspecs\features\lex.prf:
..\..\qt\mkspecs\features\include_source_dir.prf:
c:\Qt\2010.05\qt\lib\qtmaind.prl:
qmake: qmake_all FORCE
@$(QMAKE) -spec ..\..\qt\mkspecs\win32-g++ -o Makefile CppHelloQt.pro
qmake_all: FORCE
make_default: debug-make_default release-make_default FORCE
make_first: debug-make_first release-make_first FORCE
all: debug-all release-all FORCE
clean: debug-clean release-clean FORCE
distclean: debug-distclean release-distclean FORCE
-$(DEL_FILE) Makefile
check: first
debug-mocclean: $(MAKEFILE).Debug
$(MAKE) -f $(MAKEFILE).Debug mocclean
release-mocclean: $(MAKEFILE).Release
$(MAKE) -f $(MAKEFILE).Release mocclean
mocclean: debug-mocclean release-mocclean
debug-mocables: $(MAKEFILE).Debug
$(MAKE) -f $(MAKEFILE).Debug mocables
release-mocables: $(MAKEFILE).Release
$(MAKE) -f $(MAKEFILE).Release mocables
mocables: debug-mocables release-mocables
FORCE:
$(MAKEFILE).Debug: Makefile
$(MAKEFILE).Release: Makefile
|
Makefile.Debug
Copied from '/home/richel/.wine/drive_c/Qt/2010.05/ProjectsWin/CppHelloQt':
#############################################################################
# Makefile for building: CppHelloQt
# Generated by qmake (2.01a) (Qt 4.7.0) on: Thu Sep 30 13:42:17 2010
# Project: CppHelloQt.pro
# Template: app
#############################################################################
####### Compiler, tools and options
CC = gcc
CXX = g++
DEFINES = -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN
CFLAGS = -g -Wall $(DEFINES)
CXXFLAGS = -g -frtti -fexceptions -mthreads -Wall $(DEFINES)
INCPATH = -I"..\..\qt\include\QtCore" -I"..\..\qt\include\QtGui" -I"..\..\qt\include" -I"..\..\qt\include\ActiveQt" -I"debug" -I"..\..\qt\mkspecs\win32-g++"
LINK = g++
LFLAGS = -enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-reloc -mthreads -Wl -Wl,-subsystem,windows
LIBS = -L"c:\Qt\2010.05\qt\lib" -lmingw32 -lqtmaind -lQtGuid4 -lQtCored4
QMAKE = c:\qt\2010.05\qt\bin\qmake.exe
IDC = c:\Qt\2010.05\qt\bin\idc.exe
IDL = midl
ZIP = zip -r -9
DEF_FILE =
RES_FILE =
COPY = copy /y
COPY_FILE = $(COPY)
COPY_DIR = xcopy /s /q /y /i
DEL_FILE = del
DEL_DIR = rmdir
MOVE = move
CHK_DIR_EXISTS= if not exist
MKDIR = mkdir
INSTALL_FILE = $(COPY_FILE)
INSTALL_PROGRAM = $(COPY_FILE)
INSTALL_DIR = $(COPY_DIR)
####### Output directory
OBJECTS_DIR = debug
####### Files
SOURCES = main.cpp
OBJECTS = debug/main.o
DIST =
QMAKE_TARGET = CppHelloQt
DESTDIR = debug\ #avoid trailing-slash linebreak
TARGET = CppHelloQt.exe
DESTDIR_TARGET = debug\CppHelloQt.exe
####### Implicit rules
.SUFFIXES: .cpp .cc .cxx .c
.cpp.o:
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<
.cc.o:
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<
.cxx.o:
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<
.c.o:
$(CC) -c $(CFLAGS) $(INCPATH) -o $@ $<
####### Build rules
first: all
all: Makefile.Debug $(DESTDIR_TARGET)
$(DESTDIR_TARGET): $(OBJECTS)
$(LINK) $(LFLAGS) -o $(DESTDIR_TARGET) $(OBJECTS) $(LIBS)
qmake: FORCE
@$(QMAKE) -spec ..\..\qt\mkspecs\win32-g++ -o Makefile.Debug CppHelloQt.pro
dist:
$(ZIP) CppHelloQt.zip $(SOURCES) $(DIST) CppHelloQt.pro ..\..\qt\mkspecs\qconfig.pri ..\..\qt\mkspecs\modules\qt_webkit_version.pri ..\..\qt\mkspecs\features\qt_functions.prf ..\..\qt\mkspecs\features\qt_config.prf ..\..\qt\mkspecs\features\exclusive_builds.prf ..\..\qt\mkspecs\features\default_pre.prf ..\..\qt\mkspecs\features\win32\default_pre.prf ..\..\qt\mkspecs\features\debug.prf ..\..\qt\mkspecs\features\debug_and_release.prf ..\..\qt\mkspecs\features\default_post.prf ..\..\qt\mkspecs\features\win32\default_post.prf ..\..\qt\mkspecs\features\build_pass.prf ..\..\qt\mkspecs\features\win32\rtti.prf ..\..\qt\mkspecs\features\win32\exceptions.prf ..\..\qt\mkspecs\features\win32\stl.prf ..\..\qt\mkspecs\features\shared.prf ..\..\qt\mkspecs\features\warn_on.prf ..\..\qt\mkspecs\features\qt.prf ..\..\qt\mkspecs\features\win32\thread.prf ..\..\qt\mkspecs\features\moc.prf ..\..\qt\mkspecs\features\win32\windows.prf ..\..\qt\mkspecs\features\resources.prf ..\..\qt\mkspecs\features\uic.prf ..\..\qt\mkspecs\features\yacc.prf ..\..\qt\mkspecs\features\lex.prf ..\..\qt\mkspecs\features\include_source_dir.prf c:\Qt\2010.05\qt\lib\qtmaind.prl HEADERS RESOURCES IMAGES SOURCES OBJECTIVE_SOURCES FORMS YACCSOURCES YACCSOURCES LEXSOURCES
clean: compiler_clean
-$(DEL_FILE) debug\main.o
distclean: clean
-$(DEL_FILE) $(DESTDIR_TARGET)
-$(DEL_FILE) Makefile.Debug
check: first
mocclean: compiler_moc_header_clean compiler_moc_source_clean
mocables: compiler_moc_header_make_all compiler_moc_source_make_all
compiler_moc_header_make_all:
compiler_moc_header_clean:
compiler_rcc_make_all:
compiler_rcc_clean:
compiler_image_collection_make_all: qmake_image_collection.cpp
compiler_image_collection_clean:
-$(DEL_FILE) qmake_image_collection.cpp
compiler_moc_source_make_all:
compiler_moc_source_clean:
compiler_uic_make_all:
compiler_uic_clean:
compiler_yacc_decl_make_all:
compiler_yacc_decl_clean:
compiler_yacc_impl_make_all:
compiler_yacc_impl_clean:
compiler_lex_make_all:
compiler_lex_clean:
compiler_clean:
####### Compile
debug/main.o: main.cpp
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o debug\main.o main.cpp
####### Install
install: FORCE
uninstall: FORCE
FORCE:
|
Makefile.Release
Copied from '/home/richel/.wine/drive_c/Qt/2010.05/ProjectsWin/CppHelloQt':
#############################################################################
# Makefile for building: CppHelloQt
# Generated by qmake (2.01a) (Qt 4.7.0) on: Thu Sep 30 13:42:17 2010
# Project: CppHelloQt.pro
# Template: app
#############################################################################
####### Compiler, tools and options
CC = gcc
CXX = g++
DEFINES = -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN
CFLAGS = -O2 -Wall $(DEFINES)
CXXFLAGS = -O2 -frtti -fexceptions -mthreads -Wall $(DEFINES)
INCPATH = -I"..\..\qt\include\QtCore" -I"..\..\qt\include\QtGui" -I"..\..\qt\include" -I"..\..\qt\include\ActiveQt" -I"release" -I"..\..\qt\mkspecs\win32-g++"
LINK = g++
LFLAGS = -enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-reloc -Wl,-s -mthreads -Wl -Wl,-subsystem,windows
LIBS = -L"c:\Qt\2010.05\qt\lib" -lmingw32 -lqtmain -lQtGui4 -lQtCore4
QMAKE = c:\qt\2010.05\qt\bin\qmake.exe
IDC = c:\Qt\2010.05\qt\bin\idc.exe
IDL = midl
ZIP = zip -r -9
DEF_FILE =
RES_FILE =
COPY = copy /y
COPY_FILE = $(COPY)
COPY_DIR = xcopy /s /q /y /i
DEL_FILE = del
DEL_DIR = rmdir
MOVE = move
CHK_DIR_EXISTS= if not exist
MKDIR = mkdir
INSTALL_FILE = $(COPY_FILE)
INSTALL_PROGRAM = $(COPY_FILE)
INSTALL_DIR = $(COPY_DIR)
####### Output directory
OBJECTS_DIR = release
####### Files
SOURCES = main.cpp
OBJECTS = release/main.o
DIST =
QMAKE_TARGET = CppHelloQt
DESTDIR = release\ #avoid trailing-slash linebreak
TARGET = CppHelloQt.exe
DESTDIR_TARGET = release\CppHelloQt.exe
####### Implicit rules
.SUFFIXES: .cpp .cc .cxx .c
.cpp.o:
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<
.cc.o:
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<
.cxx.o:
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<
.c.o:
$(CC) -c $(CFLAGS) $(INCPATH) -o $@ $<
####### Build rules
first: all
all: Makefile.Release $(DESTDIR_TARGET)
$(DESTDIR_TARGET): $(OBJECTS)
$(LINK) $(LFLAGS) -o $(DESTDIR_TARGET) $(OBJECTS) $(LIBS)
qmake: FORCE
@$(QMAKE) -spec ..\..\qt\mkspecs\win32-g++ -o Makefile.Release CppHelloQt.pro
dist:
$(ZIP) CppHelloQt.zip $(SOURCES) $(DIST) CppHelloQt.pro ..\..\qt\mkspecs\qconfig.pri ..\..\qt\mkspecs\modules\qt_webkit_version.pri ..\..\qt\mkspecs\features\qt_functions.prf ..\..\qt\mkspecs\features\qt_config.prf ..\..\qt\mkspecs\features\exclusive_builds.prf ..\..\qt\mkspecs\features\default_pre.prf ..\..\qt\mkspecs\features\win32\default_pre.prf ..\..\qt\mkspecs\features\release.prf ..\..\qt\mkspecs\features\debug_and_release.prf ..\..\qt\mkspecs\features\default_post.prf ..\..\qt\mkspecs\features\win32\default_post.prf ..\..\qt\mkspecs\features\build_pass.prf ..\..\qt\mkspecs\features\win32\rtti.prf ..\..\qt\mkspecs\features\win32\exceptions.prf ..\..\qt\mkspecs\features\win32\stl.prf ..\..\qt\mkspecs\features\shared.prf ..\..\qt\mkspecs\features\warn_on.prf ..\..\qt\mkspecs\features\qt.prf ..\..\qt\mkspecs\features\win32\thread.prf ..\..\qt\mkspecs\features\moc.prf ..\..\qt\mkspecs\features\win32\windows.prf ..\..\qt\mkspecs\features\resources.prf ..\..\qt\mkspecs\features\uic.prf ..\..\qt\mkspecs\features\yacc.prf ..\..\qt\mkspecs\features\lex.prf ..\..\qt\mkspecs\features\include_source_dir.prf c:\Qt\2010.05\qt\lib\qtmain.prl HEADERS RESOURCES IMAGES SOURCES OBJECTIVE_SOURCES FORMS YACCSOURCES YACCSOURCES LEXSOURCES
clean: compiler_clean
-$(DEL_FILE) release\main.o
distclean: clean
-$(DEL_FILE) $(DESTDIR_TARGET)
-$(DEL_FILE) Makefile.Release
check: first
mocclean: compiler_moc_header_clean compiler_moc_source_clean
mocables: compiler_moc_header_make_all compiler_moc_source_make_all
compiler_moc_header_make_all:
compiler_moc_header_clean:
compiler_rcc_make_all:
compiler_rcc_clean:
compiler_image_collection_make_all: qmake_image_collection.cpp
compiler_image_collection_clean:
-$(DEL_FILE) qmake_image_collection.cpp
compiler_moc_source_make_all:
compiler_moc_source_clean:
compiler_uic_make_all:
compiler_uic_clean:
compiler_yacc_decl_make_all:
compiler_yacc_decl_clean:
compiler_yacc_impl_make_all:
compiler_yacc_impl_clean:
compiler_lex_make_all:
compiler_lex_clean:
compiler_clean:
####### Compile
release/main.o: main.cpp
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o release\main.o main.cpp
####### Install
install: FORCE
uninstall: FORCE
FORCE:
|
Go back to Richel Bilderbeek's C++ page.
Go back to Richel Bilderbeek's homepage.
