Results 1 to 4 of 4

Thread: Creating a hierarchy folders with QtCreator: How to do that?

  1. #1
    Join Date
    Mar 2015
    Posts
    105
    Thanks
    50

    Default Creating a hierarchy folders with QtCreator: How to do that?

    Good evening!

    Recently i noticed a curious thing. When i create a new Widget Application with QtCreator 3.3.2, the sidebar shows me all my files inside folders, for instance, look at the image attached( 1 ). But when i enter in that folder, i see this is not true. All my files are together inside the same folder. I would like to organize that and really create that folders that were shown me in QtCreator, or better, create my own folder hierarchy. How can i do that?Untitled.jpg


    Thanks!

  2. #2
    Join Date
    Dec 2009
    Location
    New Orleans, Louisiana
    Posts
    791
    Thanks
    13
    Thanked 153 Times in 150 Posts
    Qt products
    Qt5
    Platforms
    MacOS X

    Default Re: Creating a hierarchy folders with QtCreator: How to do that?

    What you are looking for, I think, is a top level project that is a subdirs project. Create a new project by choosing:

    File->New File or Project->Other Project->Subdirs Project

    After you've done that, you can create sub projects that will be in sub directories, i.e. lib, src, etc.

  3. #3
    Join Date
    Mar 2015
    Posts
    105
    Thanks
    50

    Default Re: Creating a hierarchy folders with QtCreator: How to do that?

    I don't know!

    I just want to create that subfolders, literally, not just in QtCreator. I tried what you suggested, but i don't know how to create a new QWidget Application. Here what i did, i created a new project, like you said and i called him "Rob".


    Untitled.jpg

  4. #4
    Join Date
    Dec 2009
    Location
    New Orleans, Louisiana
    Posts
    791
    Thanks
    13
    Thanked 153 Times in 150 Posts
    Qt products
    Qt5
    Platforms
    MacOS X

    Default Re: Creating a hierarchy folders with QtCreator: How to do that?

    Right click on the rob project and choose add new subproject, which can be another subdirs, or any other project type... A typical hierarchy would be something like:

    Rob
    - lib
    - client
    - server

    So the top level project is really just a list of subprojects and each subproject will be whatever you want, a dynamic library, a client executable, etc.

    Edit: For an actual example, I have a project where I provide both a GUI executable and a command line version of the program. To lay this out, I put the core functionality into a dynamic library project, a Qt Widgets project, and a Qt command line project organized like this:

    project
    - lib
    - cmd
    - gui
    Last edited by jefftee; 31st March 2015 at 03:30.

Similar Threads

  1. Creating sis files for C project Using QtCreator
    By mathi in forum Qt for Embedded and Mobile
    Replies: 0
    Last Post: 3rd April 2012, 11:51
  2. Creating Library using QTCreator (hiddevice)
    By AlphaWolfXV in forum Qt Programming
    Replies: 0
    Last Post: 2nd February 2010, 13:02
  3. creating a tree hierarchy using QStandardModel
    By wind in forum Qt Programming
    Replies: 3
    Last Post: 19th September 2006, 21:54
  4. Creating, deleting folders with C++?
    By pir in forum General Programming
    Replies: 7
    Last Post: 1st August 2006, 11:18

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.