akrep55tr
7th March 2013, 08:47
Hi all,
Whenever I open a new project in Qtcreator a default .pro file is created and I want some lines to be added in the begining. Is it possible?
For example this is default .pro file for a new project:
QT += core gui
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
TARGET = untitled
TEMPLATE = app
SOURCES += main.cpp\
mainwindow.cpp
HEADERS += mainwindow.h
FORMS += mainwindow.ui
But I want it tobe like this:
QT += core gui
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
TARGET = untitled
TEMPLATE = app
SOURCES += main.cpp\
mainwindow.cpp
HEADERS += mainwindow.h
FORMS += mainwindow.ui
CONFIG(debug, debug|release) {
debug: DESTDIR =../_Debug/debug-$${VERSION}_Qt-$${QT_VERSION}_$${DATE}
} else {
release: DESTDIR =../_Release/release-$${VERSION}_Qt-$${QT_VERSION}_$${DATE}
}
OBJECTS_DIR = $$DESTDIR/.obj
MOC_DIR = $$DESTDIR/.moc
RCC_DIR = $$DESTDIR/.qrc
UI_DIR = $$DESTDIR/.ui
Whenever I open a new project in Qtcreator a default .pro file is created and I want some lines to be added in the begining. Is it possible?
For example this is default .pro file for a new project:
QT += core gui
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
TARGET = untitled
TEMPLATE = app
SOURCES += main.cpp\
mainwindow.cpp
HEADERS += mainwindow.h
FORMS += mainwindow.ui
But I want it tobe like this:
QT += core gui
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
TARGET = untitled
TEMPLATE = app
SOURCES += main.cpp\
mainwindow.cpp
HEADERS += mainwindow.h
FORMS += mainwindow.ui
CONFIG(debug, debug|release) {
debug: DESTDIR =../_Debug/debug-$${VERSION}_Qt-$${QT_VERSION}_$${DATE}
} else {
release: DESTDIR =../_Release/release-$${VERSION}_Qt-$${QT_VERSION}_$${DATE}
}
OBJECTS_DIR = $$DESTDIR/.obj
MOC_DIR = $$DESTDIR/.moc
RCC_DIR = $$DESTDIR/.qrc
UI_DIR = $$DESTDIR/.ui