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. Adding Qt to an Existing Visual Studio project?
Forum Updated to NodeBB v4.3 + New Features

Adding Qt to an Existing Visual Studio project?

Scheduled Pinned Locked Moved General and Desktop
10 Posts 5 Posters 11.5k 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.
  • L Offline
    L Offline
    LiamMaru
    wrote on last edited by
    #1

    As above, aside from doing it manually, is there an easy way to configure an existing project to use Qt?

    1 Reply Last reply
    0
    • D Offline
      D Offline
      DenisKormalev
      wrote on last edited by
      #2

      You can try to run
      @
      qmake -project
      @
      in your sources folder, after it check .pro file for all needed sources, headers and libs and convert it to .vcproj using VS-addin

      1 Reply Last reply
      0
      • L Offline
        L Offline
        LiamMaru
        wrote on last edited by
        #3

        Mixed results, essentially broke my project file, thought I could recover it but no such luck. Any other ideas?

        1 Reply Last reply
        0
        • D Offline
          D Offline
          DenisKormalev
          wrote on last edited by
          #4

          If it didn't help then manual solution will definitely do the trick :) Maybe there are some other ways in msvs. Didn't use it (except msvc 6 and small projects in msvc 2005), so don't know.

          1 Reply Last reply
          0
          • G Offline
            G Offline
            giesbert
            wrote on last edited by
            #5

            you can just add the libs and include paths, but it then is no "real" Qt project, which means Qt plug-in will not add moc steps etc.

            SO two options:

            do it by hand :-(

            create a pro file and convert it to vcproj file --> do the settings again :-(

            Nokia Certified Qt Specialist.
            Programming Is Like Sex: One mistake and you have to support it for the rest of your life. (Michael Sinz)

            1 Reply Last reply
            0
            • D Offline
              D Offline
              DenisKormalev
              wrote on last edited by
              #6

              There is a third option - switch to QtCreator. But it is a serious tool switch and, of course, it will require some manual operations on creating project.

              1 Reply Last reply
              0
              • G Offline
                G Offline
                giesbert
                wrote on last edited by
                #7

                And it does not always work :-)

                I like creator, but for business, I have to use MSVS. We have our build system based on MSVS, so there is no way around, and I don't know, whether it is something similar for him.

                Nokia Certified Qt Specialist.
                Programming Is Like Sex: One mistake and you have to support it for the rest of your life. (Michael Sinz)

                1 Reply Last reply
                0
                • L Offline
                  L Offline
                  LiamMaru
                  wrote on last edited by
                  #8

                  Thanks guys, I ended up doing it manually, including modifying the project file to get it to moc properly. I could switch to Qt creator, however there are a few problems:

                  1. It's a DLL project (I'm not sure if this is an issue).
                  2. It's massive.

                  Which IDE I use has flow on effects for other developers I work with, so it's gotta be Visual Studio. There's a bit of manual fiddling here and there, but hopefully it will suffice.

                  1 Reply Last reply
                  0
                  • C Offline
                    C Offline
                    cardio63
                    wrote on last edited by
                    #9

                    I'm new to Qt and need to do what you did "manually". Perhaps I simply haven't found it yet, but can you point me to he manual steps you used? Thanks.

                    1 Reply Last reply
                    0
                    • K Offline
                      K Offline
                      khrl01
                      wrote on last edited by
                      #10

                      If you have an proper *.pro file You can do :
                      qmake -tp vc

                      (see QMake manual "Creating Visual Studio Project Files")

                      regards
                      karl-heinz

                      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