Results 1 to 3 of 3

Thread: Building QT program on the Linux in QtCreator

  1. #1
    Join Date
    Aug 2010
    Posts
    6
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Building QT program on the Linux in QtCreator

    Hello to all

    I made a simple hello program in the QT Creator installed on my desktop running Ubuntu 10.04 Lucid Linux and during the creation of project there was only one folder named as the "Hello" on my Desktop and contains these files :

    main.cpp
    mainwindow.cpp
    mainwindow.h
    mainwindow.ui
    Hello.pro
    Hello.pro.user

    and when I build the program it created another folder named as " Hello-build-desktop " containing these files:

    main.o
    mainwindow.o
    Makefile
    moc_mainwindow.cpp
    moc_mainwindow.o
    ui_mainwindow.h
    Hello

    I want to know that what is this all about and what all files actually mean and why it create this another folder and do not compile the files in the same folder which I have created

    Thank you

    Piyush Pandey

  2. #2
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: Building QT program on the Linux in QtCreator

    I want to know that what is this all about and what all files actually mean
    The *.o files are the object files.
    Google for what compiling is and what are object files.

    the moc_*.cpp files are moc genrated files.
    read about what the MOC is here.

    and why it create this another folder and do not compile the files in the same folder which I have created
    This is the way your QtCreator is configured.
    Read the QtCreator help in order to change these settings.
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

  3. #3
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: Building QT program on the Linux in QtCreator

    This is a shadow build directory. Using a shadow build directory ensures that only your source files are in the source directory and all intermediate files are elsewhere. This reduces clutter for version control systems, makes cleaning the build trivial, and makes bundling just the source trivial.

    The options you want are under Projects, Build Settings and are called "Shadow Build" and "Build Directory".

Similar Threads

  1. Thoughts on building Qt and QtCreator on Windows using MinGW
    By andy.fillebrown in forum Installation and Deployment
    Replies: 3
    Last Post: 17th November 2010, 12:25
  2. Qt Creator QtCreator Linux icon issue
    By Talei in forum Qt Tools
    Replies: 0
    Last Post: 13th May 2010, 04:57
  3. Replies: 1
    Last Post: 10th February 2010, 07:28
  4. Building VTK with QTCreator
    By floyd.pepper in forum Newbie
    Replies: 1
    Last Post: 17th August 2009, 08:42
  5. Building qt program with static library
    By JonathanForQT4 in forum Newbie
    Replies: 2
    Last Post: 22nd June 2007, 23:15

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.