Thread: windows QT and whatever else is needed

  1. #1
    Registered User
    Join Date
    Dec 2012
    Posts
    307

    windows QT and whatever else is needed

    OK, downloaded QT, installed it, had option for application -> QT based C++, but wouldnt compile, says i needed to pick a compilier for the project, uninstalled it, and started over, and now i dont get anything for and "application" section. and of course wants cmake and everything else....

    so for the moment i dont have a clue to what i need with QT, and to set it up so i can program C and C++ WITH QT.

    trying to use the following videos to learn it

    C++ Qt 01 - Introduction to QT programming - YouTube

  2. #2
    Registered User
    Join Date
    May 2009
    Posts
    4,183
    Your OS name and version is?
    Your Compiler name and version is?

    FYI: Downloading QT Creator might be better for you than just Qt.

    Tim S.
    "...a computer is a stupid machine with the ability to do incredibly smart things, while computer programmers are smart people with the ability to do incredibly stupid things. They are,in short, a perfect match.." Bill Bryson

  3. #3
    Registered User
    Join Date
    Dec 2012
    Posts
    307
    OS, on my develope machine, win 7

    even tried creator, been a pain

    compilier, tried mingw, pelles, gcc, the microsoft vc, vs, vb all the versions i have from 2005, 2008, 2010....nothing seems to want to work, and doesnt match the tutorial vids....either i am missing something, or some dumb thing. ill install whatever is needed to be able to follow the tutorials and learn the basics, but no idea what to do, or what steps i am missing....

  4. #4
    Registered User
    Join Date
    May 2009
    Posts
    4,183
    They changed the Qt downloads option since I did it a year or two ago.

    I think there used to be a Qt creator combined with MinGW GCC and Qt SDK option.

    It is not easy to do it piecemeal without a lot of understanding that I lack on Qt.

    Tim S.
    "...a computer is a stupid machine with the ability to do incredibly smart things, while computer programmers are smart people with the ability to do incredibly stupid things. They are,in short, a perfect match.." Bill Bryson

  5. #5
    Registered User
    Join Date
    Dec 2012
    Posts
    307
    yeah tthat is what i am running into, everything i find that tells me what to do, isnt the same as it was. Even the video that is 6 months old dont seem to apply now.

  6. #6
    Registered User
    Join Date
    Aug 2003
    Posts
    1,218
    What C++ compiler do you have?

  7. #7
    Registered User
    Join Date
    Dec 2012
    Posts
    307
    Quote Originally Posted by Crossfire View Post
    compilier, tried mingw, pelles, gcc, the microsoft vc, vs, vb all the versions i have from 2005, 2008, 2010
    as stated above

  8. #8
    Registered User
    Join Date
    Aug 2003
    Posts
    1,218
    Ah damnit, missed that one. Ok I am going to assume you use visual studio 2010 for this.

    First thing to clear up what happened with the SDK: when Qt was owned by Nokia there was a Qt SDK, which is why almost all tutorials refers you to download the SDK. This would include a version of MingW and everything, basicly it was everything you needed to get started with Qt in Qt creator. However a couple of months ago Qt was purchased by a company called digia. Since then it appears that the SDK has been removed from the LGPL version of Qt (Qt comes in a commercial license version and an open source, LGPL, version). Comments I have found suggests that the open source SDK will come back some time in the future but right now they don't have the time/manpower to maintain an open source SDK alongside the commercial version.

    Now to (hopefully) get started (I'm writing this on a linux box so some things will be taken from memory but hopefully you will get it to work).
    • First make sure you have installed Visual Studio 2010.
      Download Qt Creator and install this: http://releases.qt-project.org/qtcre...urce-2.6.1.exe
    • Now before doing anything start Qt Creator and go to Tools -> Options. Select "Build & Run" on the left side and then select "Compilers". It should list a bunch of Visual Studio 2010 entries. If it does not you will have to manually add them by editing an XML file (see end of this post).
    • I assume you have a compiler listed at this stage.
    • Now download and install Qt libraries 4.8.4 for windows (visual studio 2010): http://releases.qt-project.org/qt4/s...8.4-vs2010.exe. Make a mental note of where this was installed.
    • Once installed once again start Qt creator and go to Tools -> Options. Select "Build & Run" on the left but instead of Compilers go to "Qt Versions". If the newly installed Qt version is not listed click on "Add" and browse to the directory where you installed the libraries in the previous step. In the bin subdirectory you should have an executable named qmake.exe. Select this. Click "Apply".
    • Last thing to be done should be in qt creator: Switch to "Kits" from "Qt Versions". Here you should have a kit named "Desktop (default)" already (possibly with a warning sign). Select this and make sure "Device type" is "Desktop", "Device" is set to "Run locally", Compiler has one of the compilers added (Either x86 or x64 version, I would however advice to use x86 to lessen the potential for errors). Make sure "Qt version" has the Qt version you installed above selected.
    • Click apply.
    • To add the ability to debug applications you need to install the CDB. In "Kits" if "Debugger" shows "CDB Engine <None>" you need to install "Debugging tools for windows". Either you have it installed already (comes as part of the SDK) and you can browse to the binary (cdb.exe) or you need to install it: Download and Install Debugging Tools for Windows
      For more information about debugging read here: Qt_Creator_Windows_Debugging | Qt Wiki | Qt Project


    If you did not autodetect the visual studio 2010 compiler you need to perform the following steps:

    Edit toolchains.xml, it should be located in C:\Users\<your user>\Application Data\QtProject\qtcreator. You need to add the following, but if you have ToolChain entries in the XML file already you need to take some care:
    If you already have ToolChain.<number> entires remove the initial <data> and the last </data> in the text below. You also need to rename these so the number in ToolChain.<number> is simply continued from the last number. Also change any paths to the paths you have on your system.

    If you have no toolchains in the .xml file simply paste the big blob of text below before this entry:
    Code:
    <data>
      <variable>ToolChain.Count</variable>
      <value type="int">5</value>
     </data>
    Code:
    <data>
      <variable>ToolChain.0</variable>
      <valuemap type="QVariantMap">
       <value type="QString" key="ProjectExplorer.MsvcToolChain.SupportedAbi">x86-windows-msvc2010-pe-32bit</value>
       <value type="QString" key="ProjectExplorer.MsvcToolChain.VarsBat">c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\vcvars32.bat</value>
       <value type="bool" key="ProjectExplorer.ToolChain.Autodetect">false</value>
       <value type="QString" key="ProjectExplorer.ToolChain.DisplayName">Microsoft Visual C++ Compiler 10.0 (x86)</value>
       <value type="QString" key="ProjectExplorer.ToolChain.Id">ProjectExplorer.ToolChain.Msvc:{4d3bcf27-a8f8-4112-aea7-e84f46b99aa8}</value>
      </valuemap>
     </data>
     <data>
      <variable>ToolChain.1</variable>
      <valuemap type="QVariantMap">
       <value type="QString" key="ProjectExplorer.MsvcToolChain.SupportedAbi">x86-windows-msvc2010-pe-32bit</value>
       <value type="QString" key="ProjectExplorer.MsvcToolChain.VarsBat">c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall.bat</value>
       <value type="QString" key="ProjectExplorer.MsvcToolChain.VarsBatArg">x86</value>
       <value type="bool" key="ProjectExplorer.ToolChain.Autodetect">false</value>
       <value type="QString" key="ProjectExplorer.ToolChain.DisplayName">Microsoft Visual C++ Compiler 10.0 (x86)</value>
       <value type="QString" key="ProjectExplorer.ToolChain.Id">ProjectExplorer.ToolChain.Msvc:{c588a301-b079-4d47-b6a8-18bfbf2a12ba}</value>
      </valuemap>
     </data>
     <data>
      <variable>ToolChain.2</variable>
      <valuemap type="QVariantMap">
       <value type="QString" key="ProjectExplorer.MsvcToolChain.SupportedAbi">x86-windows-msvc2010-pe-64bit</value>
       <value type="QString" key="ProjectExplorer.MsvcToolChain.VarsBat">c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall.bat</value>
       <value type="QString" key="ProjectExplorer.MsvcToolChain.VarsBatArg">amd64</value>
       <value type="bool" key="ProjectExplorer.ToolChain.Autodetect">false</value>
       <value type="QString" key="ProjectExplorer.ToolChain.DisplayName">Microsoft Visual C++ Compiler 10.0 (amd64)</value>
       <value type="QString" key="ProjectExplorer.ToolChain.Id">ProjectExplorer.ToolChain.Msvc:{21f36cb5-66a4-41a6-a345-22d0859282c1}</value>
      </valuemap>
     </data>
     <data>
      <variable>ToolChain.3</variable>
      <valuemap type="QVariantMap">
       <value type="QString" key="ProjectExplorer.MsvcToolChain.SupportedAbi">x86-windows-msvc2010-pe-64bit</value>
       <value type="QString" key="ProjectExplorer.MsvcToolChain.VarsBat">c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall.bat</value>
       <value type="QString" key="ProjectExplorer.MsvcToolChain.VarsBatArg">x64</value>
       <value type="bool" key="ProjectExplorer.ToolChain.Autodetect">false</value>
       <value type="QString" key="ProjectExplorer.ToolChain.DisplayName">Microsoft Visual C++ Compiler 10.0 (x64)</value>
       <value type="QString" key="ProjectExplorer.ToolChain.Id">ProjectExplorer.ToolChain.Msvc:{cb529138-dfb5-485d-a528-1a78751fd302}</value>
      </valuemap>
     </data>
     <data>
      <variable>ToolChain.4</variable>
      <valuemap type="QVariantMap">
       <value type="QString" key="ProjectExplorer.MsvcToolChain.SupportedAbi">itanium-windows-msvc2010-pe-64bit</value>
       <value type="QString" key="ProjectExplorer.MsvcToolChain.VarsBat">c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall.bat</value>
       <value type="QString" key="ProjectExplorer.MsvcToolChain.VarsBatArg">ia64</value>
       <value type="bool" key="ProjectExplorer.ToolChain.Autodetect">false</value>
       <value type="QString" key="ProjectExplorer.ToolChain.DisplayName">Microsoft Visual C++ Compiler 10.0 (ia64)</value>
       <value type="QString" key="ProjectExplorer.ToolChain.Id">ProjectExplorer.ToolChain.Msvc:{c6535c10-36e7-401e-911b-b8dcf95c2702}</value>
      </valuemap>
     </data>
    You also need to edit the ToolChain.Count variable to reflect the total number of toolchains (if you had 0 before it should be 5 now).

    Hopefully this will get you started nicely with Qt and Visual Studio 2010
    Last edited by Shakti; 01-07-2013 at 02:59 AM.

  9. #9
    Registered User
    Join Date
    Dec 2012
    Posts
    307
    sounds great, might be a day or two before i get that all done, busy as hell this week. Thank you for helping, ill let you know what happens when i do it.

    //edit//

    Oh yeah, the sdk is where i was having the download issues, know nokia had it, didnt know they resold it! that would explain the not finding the "right" downloads!!!

    thanks for the info, and of course the update to the QT status of ownership!

  10. #10
    Registered User
    Join Date
    Dec 2012
    Posts
    307
    used VB2008, everything went smoothly, examples build and ran fine!

    noticed there still is no option for C or C++ WITH the QT librarys. i had it once when nothing else would work.

  11. #11
    Registered User
    Join Date
    Aug 2003
    Posts
    1,218
    Glad to hear it worked alright.

    However what do you mean with still no option for c or c++ with the qt libraries?

    Edit: And since you use VS2008 I assume you downloaded the appropriate build for that from the Qt homepage and not for 2010?

  12. #12
    Registered User
    Join Date
    Dec 2012
    Posts
    307
    yes the 2008 lib`s, before when i did an install, with the added libs, one of the options under applications was a C and C++ with the QT, now all i see is the c and c++ under NON-QT

  13. #13
    Registered User
    Join Date
    Aug 2003
    Posts
    1,218
    Yah that is the same for me, so I guess it is by design. However a Qt Console application is pretty much a C++ project with Qt libraries available.

  14. #14
    Registered User
    Join Date
    Dec 2012
    Posts
    307
    Thank you very much

    started using that with the vids, and it works great

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Workaround needed for sprintf in Windows 7
    By neilc in forum C++ Programming
    Replies: 10
    Last Post: 01-26-2011, 01:24 PM
  2. help on C on Windows needed desperately
    By invalidPreproc in forum C Programming
    Replies: 20
    Last Post: 11-29-2010, 04:38 PM
  3. c/c++ Windows Mobile Developer Needed
    By ParaDiddle in forum Projects and Job Recruitment
    Replies: 0
    Last Post: 08-02-2007, 07:24 AM
  4. Windows Installation Help Needed
    By bennyandthejets in forum Tech Board
    Replies: 4
    Last Post: 03-05-2004, 06:04 AM
  5. Help Needed With Windows GUI
    By edselman in forum Windows Programming
    Replies: 5
    Last Post: 08-22-2002, 09:38 PM