Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. Visual Studio MFC project in Qt Creator
Forum Updated to NodeBB v4.3 + New Features

Visual Studio MFC project in Qt Creator

Scheduled Pinned Locked Moved Qt Creator and other tools
11 Posts 5 Posters 8.4k 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
    auric
    wrote on 12 Apr 2012, 06:45 last edited by
    #1

    How can I open and compile Visual Studio MFC project (and solution) in Qt Creator?

    1 Reply Last reply
    0
    • V Offline
      V Offline
      veeraps
      wrote on 12 Apr 2012, 07:11 last edited by
      #2

      I wonder - is that possible in Qt Creator.

      The other way is possible i.e., a .PRO file can be opened and compiled on Visual Studio.

      ~veeraps

      1 Reply Last reply
      0
      • A Offline
        A Offline
        auric
        wrote on 12 Apr 2012, 07:32 last edited by
        #3

        I know about it. And I'd like to know is it possible to open Visual Studio files under Qt Creator in any way?

        1 Reply Last reply
        0
        • T Offline
          T Offline
          tobias.hunger
          wrote on 12 Apr 2012, 08:28 last edited by
          #4

          I am not aware of a way to do so. You can create a dummy .pro file using "qmake -project" and open that in Qt Creator and then reconfigure the build configuration to actually use msbuild for its work.

          1 Reply Last reply
          0
          • S Offline
            S Offline
            SteveKing
            wrote on 12 Apr 2012, 14:33 last edited by
            #5

            You could load the project into Visual Studio, and then export it to a .pro file using the VS plugin. This is kind of a one way process and the .pro file it produces might need some hand crafting.

            1 Reply Last reply
            0
            • A Offline
              A Offline
              auric
              wrote on 12 Apr 2012, 20:02 last edited by
              #6

              [quote author="SteveKing" date="1334241204"]You could load the project into Visual Studio, and then export it to a .pro file using the VS plugin. This is kind of a one way process and the .pro file it produces might need some hand crafting.[/quote]

              It's not possible for any project except projects using Qt. I have MFC project (without Qt libraries), how can it be exported?

              1 Reply Last reply
              0
              • M Offline
                M Offline
                mlong
                wrote on 12 Apr 2012, 20:04 last edited by
                #7

                In the .pro file that's generated, just add the line
                @
                CONFIG -= qt
                @
                to remove the Qt dependencies.

                (There may be something else you have to do... others will jump in and comment if there is.)

                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
                  auric
                  wrote on 12 Apr 2012, 20:17 last edited by
                  #8

                  No. Sorry, there is some misunderstanding. Plugin wont generate any .pro file if current project is not Qt project. There is menu 'Create basic .pro File', which is only active while current project is using Qt. Or am I get something wrong?

                  1 Reply Last reply
                  0
                  • M Offline
                    M Offline
                    mlong
                    wrote on 12 Apr 2012, 20:21 last edited by
                    #9

                    There's always the tried-and-true method of using
                    @
                    qmake -project
                    @
                    as documented "here":/doc/qt-4.8/qmake-running.html to generate a .pro file from a collection of source files. It's not the same as porting from a VS project file, but it's an option.

                    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
                      auric
                      wrote on 13 Apr 2012, 05:47 last edited by
                      #10

                      Thanks. But if I have about 100 projects and their files collected in many subdirs (which have sometimes subdirs too)?..

                      Yes. I can use
                      @
                      qmake -project -r
                      @
                      I also can write some script. Thanks, mlong, you gave me a good idea. The most problematic is to port options of solution and projects, but that's non Qt side :)

                      1 Reply Last reply
                      0
                      • M Offline
                        M Offline
                        mlong
                        wrote on 13 Apr 2012, 15:10 last edited by
                        #11

                        Be aware that .pro files support the SUBDIRS template, which can be useful for nested projects. The docs talk about those, too.

                        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

                        1/11

                        12 Apr 2012, 06:45

                        • Login

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