Results 1 to 2 of 2

Thread: How can I create my own default .pro file?

  1. #1
    Join Date
    Nov 2010
    Posts
    3
    Thanks
    5
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default How can I create my own default .pro file?

    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 Code:
    1. QT += core gui
    2. greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
    3. TARGET = untitled
    4. TEMPLATE = app
    5. SOURCES += main.cpp\
    6. mainwindow.cpp
    7. HEADERS += mainwindow.h
    8. FORMS += mainwindow.ui
    To copy to clipboard, switch view to plain text mode 

    But I want it tobe like this:
    Qt Code:
    1. QT += core gui
    2. greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
    3. TARGET = untitled
    4. TEMPLATE = app
    5. SOURCES += main.cpp\
    6. mainwindow.cpp
    7. HEADERS += mainwindow.h
    8. FORMS += mainwindow.ui
    9.  
    10. CONFIG(debug, debug|release) {
    11. debug: DESTDIR =../_Debug/debug-$${VERSION}_Qt-$${QT_VERSION}_$${DATE}
    12. } else {
    13. release: DESTDIR =../_Release/release-$${VERSION}_Qt-$${QT_VERSION}_$${DATE}
    14. }
    15.  
    16. OBJECTS_DIR = $$DESTDIR/.obj
    17. MOC_DIR = $$DESTDIR/.moc
    18. RCC_DIR = $$DESTDIR/.qrc
    19. UI_DIR = $$DESTDIR/.ui
    To copy to clipboard, switch view to plain text mode 

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: How can I create my own default .pro file?

    For this particular thing I think you'd need to change QtCreator sources and rebuild the IDE. It seems this particular project type wizard is not based on templates.

    An alternative is to create your own pri or prf file and simply add a line in the project file to active it.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. The following user says thank you to wysota for this useful post:

    akrep55tr (7th March 2013)

Similar Threads

  1. File Dialog Default Directory Not Right
    By cpsmusic in forum Newbie
    Replies: 0
    Last Post: 27th October 2011, 13:09
  2. Replies: 0
    Last Post: 10th June 2011, 09:58
  3. How do I create a default QTextStream?
    By lni in forum Qt Programming
    Replies: 5
    Last Post: 18th October 2009, 20:36
  4. How to set default icons of different file types?
    By merry in forum Qt Programming
    Replies: 3
    Last Post: 2nd June 2008, 15:24

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.