Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Project folder hierarchy and subprograms help

Project folder hierarchy and subprograms help

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 2.7k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • V Offline
    V Offline
    vezprog
    wrote on last edited by
    #1

    So this is something that has been lingering with me throughout my Qt4 project ive been working on for a little while now. I just recently started looking into Qt folder structures in the Qt Creator and am a little confused, but here is what I am trying to do.

    I have a main program that contains a form with multiple buttons. When one of those buttons is "clicked", a new application spawns in its own thread using QProcess (this application is its own executable built on a separate project right now, I have 8 project folders and would like to condense it into one project).

    So for example, this is what my folder structure looks like.

    dvezsapplication/
    dvezsapplication/mainprogramexecutable
    dvezsapplication/drivers/executable1
    dvezsapplication/drivers/executable2
    dvezsapplication/drivers/executable3
    dvezsapplication/drivers/executable4
    dvezsapplication/drivers/executable5
    dvezsapplication/config/alloftheinifilesandconfigurationfileshere.ini

    Right now, each one of those executable's in the drivers folder is built separately from their own .pro file in their own application folder, then once built, it is copied into the main programs folder structure so the QProcess calls work correctly.

    I have about 9 executables that can spawn from the main program, each having their own main form. The purpose of this was so if there was a bug found in one of the sub drivers, it would be easy to fix, all i would have to do is rebuild the single executable and replace the old. Likewise with any of the sub executable's.

    My question here is, can I have one main project, then have sub projects within the main project that get built as well (I do this in eclipse when doing c++ projects) with there own executable's, so I don't have to worry about copying all the executable's into the main folder?

    I have looked online for a good example and haven't been able to find one yet. I know there is the .pri files.

    p.s. I am going to be using this crossplatform between linux and windows (currently developing in linux).

    1 Reply Last reply
    0
    • H Offline
      H Offline
      Hostel
      wrote on last edited by
      #2

      In .pro file you have a variable TEMPLATE - default is app. You can try use a - "subdirs template":http://developer.qt.nokia.com/doc/qt-4.8/qmake-project-files.html#project-templates

      Check also "DEPENDPATH":http://developer.qt.nokia.com/doc/qt-4.8/qmake-variable-reference.html#dependpath - this can be done from Qt Creator interface.

      You can also think about change executable[1-5] from app to dynamic libs or plugins.

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved