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. [Solved] How do I create subdirectories in Qt Creator?
Forum Updated to NodeBB v4.3 + New Features

[Solved] How do I create subdirectories in Qt Creator?

Scheduled Pinned Locked Moved General and Desktop
5 Posts 3 Posters 8.8k Views 1 Watching
  • 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.
  • A Offline
    A Offline
    AutoBot
    wrote on 26 Jul 2011, 03:04 last edited by
    #1

    Hi everybody, I've just started trying to port an OpenGL program I made in Visual Studio to Qt Creator so I can expand it with a UI, but I'm finding it difficult to get the layout I had originally:

    !http://img8.imageshack.us/img8/7933/vstoqtproject.jpg(Visual Studio layout)!

    As you can see there's a few subdirectories that hold a library (GL Tools) that I'm using for the application. One of the big problems is that I don't know how to implement subdirectories in the Qt Creator projects view (and whatever I did try didn't seem to work). How exactly do I accomplish this?

    Help and advice are greatly appreciated!

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SimonL
      wrote on 26 Jul 2011, 04:24 last edited by
      #2

      Are you using a .pro file? i had the experience with cmake that if i opened the project from a cmake file i'd just get a flat list. If i use a .pro file however it works fine for me just by having the files in a separate folder and it maintains the directory structure.

      1 Reply Last reply
      0
      • A Offline
        A Offline
        AutoBot
        wrote on 26 Jul 2011, 15:19 last edited by
        #3

        [quote author="SimonL" date="1311654274"]Are you using a .pro file? i had the experience with cmake that if i opened the project from a cmake file i'd just get a flat list. If i use a .pro file however it works fine for me just by having the files in a separate folder and it maintains the directory structure.[/quote]

        Yeah, I'm trying to use a .pro file with it, and not having much luck so far. Here's what I have in it so far:

        @HEADERS +=
        WndProc.h
        WindowManager.h
        main.h
        GraphicsManager.h
        EntryPoint.h
        Application.h
        GL Tools/StopWatch.h
        GL Tools/math3d.h
        GL Tools/GLTriangleBatch.h
        GL Tools/GLTools.h
        GL Tools/GLShaderManager.h
        GL Tools/GLMatrixStack.h
        GL Tools/GLGeometryTransform.h
        GL Tools/GLFrustum.h
        GL Tools/GLFrame.h
        GL Tools/GLBatchBase.h
        GL Tools/GLBatch.h

        SOURCES +=
        WndProc.cpp
        WindowManager.cpp
        main.cpp
        GraphicsManager.cpp
        EntryPoint.cpp
        Application.cpp
        GL Tools/math3d.cpp
        GL Tools/GLTriangleBatch.cpp
        GL Tools/GLTools.cpp
        GL Tools/GLShaderManager.cpp
        GL Tools/GLBatch.cpp

        LIBS += glu32.lib
        opengl32.lib
        glew32s.lib
        @

        Yet it only appears in the project explorer as this:

        !http://img846.imageshack.us/img846/9652/vstoqtproject2.jpg(Qt Project Explorer)!

        Am I doing something wrong?

        Also on a side note, when I try to build the project I get the error ":-1: error: No rule to make target GL', needed by debug/GL.o'. Stop." (using MinGW). So if anybody knows, help would be appreciated on that as well.

        MAJOR EDIT AND SOLUTION: I have the subdirectories working now, it's because the folder "GL Tools" had a space in it! I renamed it to "GLTools" and it works now, not to mention that error went away (which is how I started thinking of the solution, because it couldn't find "GL").

        Thanks for the suggestions SimonL!

        1 Reply Last reply
        0
        • M Offline
          M Offline
          mlong
          wrote on 26 Jul 2011, 18:13 last edited by
          #4

          The .pro file doesn't like spaces in the directory name. If you remove them you should be good to go.

          Edit: Wow. Completely didn't see the last half of your last post (or the [Solved] in the title). I guess I got too excited about figuring out the problem. :-) I need to start getting more sleep, I think.

          Software Engineer
          My views and opinions do not necessarily reflect those of anyone -- living or dead, real or fictional -- in this universe or any other similar multiverse node. Void where prohibited. Your mileage may vary. Caveat emptor.

          1 Reply Last reply
          0
          • A Offline
            A Offline
            AutoBot
            wrote on 27 Jul 2011, 17:42 last edited by
            #5

            [quote author="mlong" date="1311704016"]Edit: Wow. Completely didn't see the last half of your last post (or the [Solved] in the title). I guess I got too excited about figuring out the problem. :-) I need to start getting more sleep, I think.
            [/quote]

            Haha, it's fine, I do that quite a bit too at times. :D

            1 Reply Last reply
            0

            1/5

            26 Jul 2011, 03:04

            • Login

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