Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. General talk
  3. The Lounge
  4. How and where to start Qt5
Forum Updated to NodeBB v4.3 + New Features

How and where to start Qt5

Scheduled Pinned Locked Moved Solved The Lounge
59 Posts 8 Posters 35.8k Views 6 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.
  • tomyT tomy

    @Wieland said:

    The first thing to know is your toolchain: Integrated development environment, version control system, build system, compiler, debugger, profiler. Although you can choose from a number of different tools I'd recommend to become familiar with Qt Creator, git, QMake and the compiler of your choice (gcc, Xcode, MSVC).

    Thank you Wieland, but to which need of me do the above comments refer to please?

    @Wieland said:

    We also have a wiki. Content quality there varies from great to ... well, not so great :-) Two good articles there that I'd like to mention are What is Qt? and Qt for Beginners. You should also read the Qt Creator manual and the QMake manual.

    I read Wiki and What's Qt pages but since I don't have Qt creator installed on my Windows 7 x64 machine, I cannot follow Qt For Beginners part.

    For a beginner like me with needs that I mentioned above, which flavor of Qt creator should I download and install please? The open-source one or the commercial one?

    ? Offline
    ? Offline
    A Former User
    wrote on last edited by
    #12

    @tomy said:

    to which need of me do the above comments refer to please?

    As you already know how to write programs in C++ you also already know that you'll need a code editor and a compiler. Qt Creator is the integrated development environment of choice for developing software with Qt. It has a code editor with integrated help system, code completion, syntax highlighting etc. It is cross platform, so Qt Creator runs on Linux, Windows and OS X. Git is the version control system of choice today for every software developer, no matter if she uses Qt, C++, JavaScript or anything else. Qt Creator has git integration. You can use git on any platform (Linux, Windows, OS X, ...). The choice for the compiler depends on your host and target platform. If you write software for Windows and have a MS Visual Studio license then you can use that compiler (MSVC). If you don't have such license you can use gcc for Windows. On OS X you will most likely use XCode's compiler (clang). On Linux you can use gcc or clang. You said you're on Windows. You can compile software for Windows and Android there. If you want to compile software for iOS you'll need a Mac. If you want to build your software for Linux you'll also need a Linux host.

    1 Reply Last reply
    1
    • tomyT tomy

      Thank you all very much. You are really nice guys and I'm happy to be a member of here programming in Qt :)

      I read all of your advices. Since Qt is very massive and have many directions (if I have understood it correctly) I like to mention my favorite stuffs. I like to first learn to write code for creating iOS and Android apps (applicable on smartphones). It is my first goal. After that I like to create programs for MS Windows.

      As you say and I have heard it, the Qt documentation is very great, but for me as an absolute beginner of Qt, there is a problem :(
      That is, it's not regularly arranged like a book. When you read a book, you start from page one then two through end. The documentation jumps form one subject to another (it's what I've seen when trying to use that documentation) and then I miss the path and cannot consistently follow all of the contents step-by-step.

      Dear JKSH suggested a start point. Now, for example, how to start from http://doc.qt.io/qt-5/index.html and then find a link that points to http://doc.qt.io/qt-5/gettingstartedqt.html?
      That is, it's not clear how to use the documentation, at least in my experience.

      First I want (if you agree) to start from http://doc.qt.io/qt-5/index.html (because I think I should be familiar with Qt that what the Qt is at all) then find a link there that leads to http://doc.qt.io/qt-5/gettingstartedqt.html? (if it's good for my first directions that is being able to write iOS and Android apps).

      Thanks again to all of you.

      JKSHJ Offline
      JKSHJ Offline
      JKSH
      Moderators
      wrote on last edited by
      #13

      @tomy said:

      Thank you all very much. You are really nice guys and I'm happy to be a member of here programming in Qt :)

      You're welcome! :)

      I like to first learn to write code for creating iOS and Android apps (applicable on smartphones). It is my first goal. After that I like to create programs for MS Windows.

      I think it's easier to learn how to create programs for Windows than for Android and iOS. Because of this, I recommend you first spend a few days learning how to build a simple Qt program for Windows. This experience will help you learn how to write and build Qt programs for Android and iOS.

      This is the sequence I recommend:

      1. Follow http://doc.qt.io/qt-5/gettingstartedqt.html closely. This teaches you how to use the Qt Creator IDE and build a small program for Windows.
      2. Follow http://doc.qt.io/qt-5/androidgs.html. This teaches you how to set up your system for creating Android apps.
      3. Follow http://doc.qt.io/qtcreator/creator-mobile-app-tutorial.html. This teaches you how to build a small program for Android and run it on your device.
      4. Follow http://doc.qt.io/qtcreator/creator-developing-ios.html. This teaches you how to set up your system for creating iOS apps.
      5. Go back to #3 and run the same program on your iOS device. (Note: You need to use OS X to develop iOS apps)

      Another note: In #1, you will use the C++ language and the Qt Widgets module. In #3, you will use the QML language and the Qt Quick module. Qt Widgets is easier for beginners to learn (especially if you already know C++), but Qt Quick is more suitable for mobile apps.

      Dear JKSH suggested a start point. Now, for example, how to start from http://doc.qt.io/qt-5/index.html and then find a link that points to http://doc.qt.io/qt-5/gettingstartedqt.html?
      That is, it's not clear how to use the documentation, at least in my experience.

      The Qt documentation uses a reference format. As you have found out, you shouldn't try to read it from start to finish like a book.

      Instead, use a search engine to find information about the topics that you are interested in. For example, you can fo to http://doc.qt.io/qt-5/index.html and type "getting started" into the search box.

      First I want (if you agree) to start from http://doc.qt.io/qt-5/index.html (because I think I should be familiar with Qt that what the Qt is at all) then find a link there that leads to http://doc.qt.io/qt-5/gettingstartedqt.html? (if it's good for my first directions that is being able to write iOS and Android apps).

      Personally, I think http://doc.qt.io/qt-5/index.html is not a good place to start. It leads to too many advanced topics, but It doesn't lead to http://doc.qt.io/qt-5/gettingstartedqt.html easily.

      Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

      1 Reply Last reply
      1
      • tomyT Offline
        tomyT Offline
        tomy
        wrote on last edited by
        #14

        I thank both of you very much. I'm sorry for asking those many questions.
        According to what I understood from your explanations, I'm going to do the following works, respectively. If any work is not suitable for me or you don't recommend it to me, please aware me of that.

        1- First I go to qt-unified-windows-x86-online.exe. and install Qt creator in default mode. Although I have MS VS 2015 licensed installed on my Windows machine, but I don't like Qt creator as an add-in to it. I like to have Qt creator as a complete IDE on my system.

        2- Then after installing Qt creator I go through number 1 to number 5 of the last post of JKSH. I try to completely read and do the tasks/codes written there.

        3- Then, I install a Mac OS on as virtual machine on my Windows machine. I think I should install another Qt creator on it to begin to write codes for iOS. Am I right?

        4- And at the end, if I have any problem or question, I'll try to create a new thread about that or post the matter here.

        Do you guys agree with these please?

        1 Reply Last reply
        0
        • ? Offline
          ? Offline
          A Former User
          wrote on last edited by
          #15

          Don't know about your point number 3 (I don't develop for OS X and iOS) but the rest sounds like a good plan. And don't hesitate to ask the forum. Good luck, young Padawan! ;-)

          1 Reply Last reply
          1
          • mrjjM Offline
            mrjjM Offline
            mrjj
            Lifetime Qt Champion
            wrote on last edited by
            #16

            " I'm sorry for asking those many questions."

            Well we kind lurk around here hoping people will in fact, ask questions :)

            One note for 1:
            You can use VS with Creator. as its compiler. So its also a full solution.
            That said. Its less fuss just to use mingw
            and install and have all just work out of the box.

            1 Reply Last reply
            1
            • tomyT Offline
              tomyT Offline
              tomy
              wrote on last edited by
              #17

              @Wieland said:

              Don't know about your point number 3 (I don't develop for OS X and iOS) but the rest sounds like a good plan. And don't hesitate to ask the forum. Good luck, young Padawan! ;-)

              Thanks. I appreciate your helps :-)

              @mrjj said:

              " I'm sorry for asking those many questions."
              Well we kind lurk around here hoping people will in fact, ask questions :)

              Thank you. :-) That's very kind of you.

              @mrjj said:

              One note for 1:
              You can use VS with Creator. as its compiler. So its also a full solution.
              That said. Its less fuss just to use mingw
              and install and have all just work out of the box.

              I'm sorry I didn't understand the above part completely. I'm not an English native speaker. :(
              Do you mean that I can use Qt creator with VS 2015? Is it like an add-in item? Can it offer all of the stuff the Qt creator as a separate program offer? If so and you recommend it to me, where and how can I install it on my VS please?

              1 Reply Last reply
              0
              • mrjjM Offline
                mrjjM Offline
                mrjj
                Lifetime Qt Champion
                wrote on last edited by mrjj
                #18

                note part 1:
                I was trying to say that using visual studio can also be good.
                However, vs 2015 is so new that im not sure there is good support yet.
                So I suggest just use the standard setup so U can get going fast.
                sorry for the confusion.

                1 Reply Last reply
                0
                • tomyT Offline
                  tomyT Offline
                  tomy
                  wrote on last edited by tomy
                  #19

                  @mrjj said:

                  note part 1:
                  I was trying to say that using visual studio can also be good.
                  However, vs 2015 is so new that im not sure there is good support yet.
                  So I suggest just use the standard setup so U can get going fast.

                  OK. I tried to install Qt creator in its normal way (connecting to the Qt resources) but faced an error. It's in the link below:
                  http://uploads.im/QXBsp.png
                  Is there any other way to download that Qt creator completely as a file please?

                  @mrjj said:

                  sorry for the confusion.

                  Not at all, that's fine :-)

                  1 Reply Last reply
                  0
                  • mrjjM Offline
                    mrjjM Offline
                    mrjj
                    Lifetime Qt Champion
                    wrote on last edited by mrjj
                    #20

                    hi
                    http://download.qt.io/official_releases/qt/5.5/5.5.1/qt-opensource-windows-x86-mingw492-5.5.1.exe
                    Note: this is full packet and do not use visual studio but mingw compiler.

                    1 Reply Last reply
                    1
                    • tomyT Offline
                      tomyT Offline
                      tomy
                      wrote on last edited by
                      #21

                      @mrjj said:

                      http://download.qt.io/official_releases/qt/5.5/5.5.1/qt-opensource-windows-x86-mingw492-5.5.1.exe

                      Thanks. I'm downloading it now. But one small question! In the normal method (downloading through Qt) that installation would occupy about 3.8 GB on the computer but this file's size is even less than 1 GB! should I update/add the missed stuff to that smaller one after installing?

                      1 Reply Last reply
                      0
                      • mrjjM Offline
                        mrjjM Offline
                        mrjj
                        Lifetime Qt Champion
                        wrote on last edited by mrjj
                        #22

                        hi u get a maintenance tool that can update stuff/add elements.

                        1 Reply Last reply
                        0
                        • tomyT Offline
                          tomyT Offline
                          tomy
                          wrote on last edited by
                          #23

                          Thank you.

                          mrjjM 1 Reply Last reply
                          0
                          • tomyT tomy

                            Thank you.

                            mrjjM Offline
                            mrjjM Offline
                            mrjj
                            Lifetime Qt Champion
                            wrote on last edited by
                            #24

                            @tomy
                            as final remark.
                            this book
                            http://www.bogotobogo.com/cplusplus/files/c-gui-programming-with-qt-4-2ndedition.pdf
                            i found pretty ok when starting with qt.
                            Its for qt4 but much of it still the same in Qt5.5.

                            1 Reply Last reply
                            1
                            • SGaistS Offline
                              SGaistS Offline
                              SGaist
                              Lifetime Qt Champion
                              wrote on last edited by
                              #25

                              To develop for iOS and OS X you will indeed need to install Qt Creator on your Mac machine (be it virtual or not) but you will be using the same for both platform. Xcode is mandatory to develop for OS X and iOS. It provides the SDKs and emulators needed as well as the software stack needed to connect to your device and make your application available through the App Store.

                              Interested in AI ? www.idiap.ch
                              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                              1 Reply Last reply
                              1
                              • tomyT Offline
                                tomyT Offline
                                tomy
                                wrote on last edited by
                                #26

                                @mrjj said:

                                @tomy
                                as final remark.
                                this book
                                http://www.bogotobogo.com/cplusplus/files/c-gui-programming-with-qt-4-2ndedition.pdf
                                i found pretty ok when starting with qt.
                                Its for qt4 but much of it still the same in Qt5.5.

                                I have that book but haven't read it still! I like to start straightly with Qt5. Anyway, thanks for your remarks :-)

                                @SGaist said:

                                To develop for iOS and OS X you will indeed need to install Qt Creator on your Mac machine (be it virtual or not) but you will be using the same for both platform. Xcode is mandatory to develop for OS X and iOS. It provides the SDKs and emulators needed as well as the software stack needed to connect to your device and make your application available through the App Store.

                                Thanks, these are great info. Now I've VmWare workstation containing Win XP, Win 10, Linux(Ubuntu) and FreeBSD installed on my Win 7 machine. I'll add another virtual machine (the Mac OS) on it before starting developing iOS apps.
                                Thanks. :-)

                                1 Reply Last reply
                                0
                                • tomyT Offline
                                  tomyT Offline
                                  tomy
                                  wrote on last edited by tomy
                                  #27

                                  Hi guys,

                                  Along the way I chose for starting to learn Qt 5, I went to create a Qt Quick Application in here: http://doc.qt.io/qtcreator/qtcreator-transitions-example.html
                                  Now one of my problems is that I cannot find that (Export) button (said in item #11 of Creating the Main View section of the above link) in the navigator pane on my Qt creator IDE :-(
                                  Can anybody please help me?

                                  CharbyC 1 Reply Last reply
                                  0
                                  • tomyT tomy

                                    Hi guys,

                                    Along the way I chose for starting to learn Qt 5, I went to create a Qt Quick Application in here: http://doc.qt.io/qtcreator/qtcreator-transitions-example.html
                                    Now one of my problems is that I cannot find that (Export) button (said in item #11 of Creating the Main View section of the above link) in the navigator pane on my Qt creator IDE :-(
                                    Can anybody please help me?

                                    CharbyC Offline
                                    CharbyC Offline
                                    Charby
                                    wrote on last edited by
                                    #28

                                    @tomy This button is aside the "eye" button for each element listed in the navigator pane.
                                    In the example, in the bottom left, you will see the navigator panel. The panel contains Item which contains "Icon" and at the end of this "Icon" row you will find the toggle property export and toggle visibity controls.
                                    Hope this helps. If not just send me a screenshot and I will return it to you with a marking.

                                    1 Reply Last reply
                                    0
                                    • tomyT Offline
                                      tomyT Offline
                                      tomy
                                      wrote on last edited by tomy
                                      #29

                                      @Charby said:

                                      @tomy This button is aside the "eye" button for each element listed in the navigator pane.
                                      In the example, in the bottom left, you will see the navigator panel. The panel contains Item which contains "Icon" and at the end of this "Icon" row you will find the toggle property export and toggle visibity controls.
                                      Hope this helps. If not just send me a screenshot and I will return it to you with a marking.

                                      Thanks for the reply.
                                      I retried that application creation for 5 times from beginning to the end, but neither that export button appeared nor my code (the one below) is exactly like this (http://doc.qt.io/qtcreator/qtcreator-transitions-mainform-ui-qml.html) :-(
                                      I don't know how I can learn Qt from the documentation if I have those many problems at the first step! :-( Very disappointing.

                                      import QtQuick 2.5
                                      import QtQuick.Controls 1.4
                                      import QtQuick.Layouts 1.2

                                      Item {
                                      id: item1
                                      width: 640
                                      height: 480

                                      property alias button1: button1
                                      property alias button2: button2
                                      
                                      Image {
                                          id: icon
                                          x: 10
                                          y: 20
                                          source: "qt-logo.PNG"
                                      }
                                      
                                      Rectangle {
                                          id: topLeftRect
                                          width: 46
                                          height: 55
                                          color: "#00000000"
                                          radius: 6
                                          anchors.left: parent.left
                                          anchors.leftMargin: 10
                                          anchors.top: parent.top
                                          anchors.topMargin: 20
                                          border.color: "#808080"
                                          
                                          MouseArea {
                                              id: mouseArea1
                                              anchors.fill: parent
                                          }
                                      }
                                      
                                      Rectangle {
                                          id: middleRightRect
                                          x: -9
                                          y: -7
                                          width: 46
                                          height: 55
                                          color: "#00000000"
                                          radius: 6
                                          anchors.right: parent.right
                                          anchors.rightMargin: 10
                                          anchors.horizontalCenter: parent.horizontalCenter
                                          border.color: "#808080"
                                          MouseArea {
                                              id: mouseArea2
                                              anchors.fill: parent
                                          }
                                      }
                                      
                                      Rectangle {
                                          id: bottomLeftRect
                                          y: 1
                                          width: 46
                                          height: 55
                                          color: "#00000000"
                                          radius: 6
                                          anchors.left: parent.left
                                          anchors.leftMargin: 10
                                          anchors.bottom: parent.bottom
                                          anchors.bottomMargin: 20
                                          border.color: "#808080"
                                          MouseArea {
                                              id: mouseArea3
                                              anchors.fill: parent
                                          }
                                      }
                                      

                                      }

                                      Apparently uploading images to the posts is not allowed so I uploaded my design page of the IDE of that code here: http://uploads.im/ip2hb.png

                                      JKSHJ 1 Reply Last reply
                                      0
                                      • tomyT tomy

                                        @Charby said:

                                        @tomy This button is aside the "eye" button for each element listed in the navigator pane.
                                        In the example, in the bottom left, you will see the navigator panel. The panel contains Item which contains "Icon" and at the end of this "Icon" row you will find the toggle property export and toggle visibity controls.
                                        Hope this helps. If not just send me a screenshot and I will return it to you with a marking.

                                        Thanks for the reply.
                                        I retried that application creation for 5 times from beginning to the end, but neither that export button appeared nor my code (the one below) is exactly like this (http://doc.qt.io/qtcreator/qtcreator-transitions-mainform-ui-qml.html) :-(
                                        I don't know how I can learn Qt from the documentation if I have those many problems at the first step! :-( Very disappointing.

                                        import QtQuick 2.5
                                        import QtQuick.Controls 1.4
                                        import QtQuick.Layouts 1.2

                                        Item {
                                        id: item1
                                        width: 640
                                        height: 480

                                        property alias button1: button1
                                        property alias button2: button2
                                        
                                        Image {
                                            id: icon
                                            x: 10
                                            y: 20
                                            source: "qt-logo.PNG"
                                        }
                                        
                                        Rectangle {
                                            id: topLeftRect
                                            width: 46
                                            height: 55
                                            color: "#00000000"
                                            radius: 6
                                            anchors.left: parent.left
                                            anchors.leftMargin: 10
                                            anchors.top: parent.top
                                            anchors.topMargin: 20
                                            border.color: "#808080"
                                            
                                            MouseArea {
                                                id: mouseArea1
                                                anchors.fill: parent
                                            }
                                        }
                                        
                                        Rectangle {
                                            id: middleRightRect
                                            x: -9
                                            y: -7
                                            width: 46
                                            height: 55
                                            color: "#00000000"
                                            radius: 6
                                            anchors.right: parent.right
                                            anchors.rightMargin: 10
                                            anchors.horizontalCenter: parent.horizontalCenter
                                            border.color: "#808080"
                                            MouseArea {
                                                id: mouseArea2
                                                anchors.fill: parent
                                            }
                                        }
                                        
                                        Rectangle {
                                            id: bottomLeftRect
                                            y: 1
                                            width: 46
                                            height: 55
                                            color: "#00000000"
                                            radius: 6
                                            anchors.left: parent.left
                                            anchors.leftMargin: 10
                                            anchors.bottom: parent.bottom
                                            anchors.bottomMargin: 20
                                            border.color: "#808080"
                                            MouseArea {
                                                id: mouseArea3
                                                anchors.fill: parent
                                            }
                                        }
                                        

                                        }

                                        Apparently uploading images to the posts is not allowed so I uploaded my design page of the IDE of that code here: http://uploads.im/ip2hb.png

                                        JKSHJ Offline
                                        JKSHJ Offline
                                        JKSH
                                        Moderators
                                        wrote on last edited by JKSH
                                        #30

                                        @tomy said:

                                        I uploaded my design page of the IDE of that code here: http://uploads.im/ip2hb.png

                                        The "Export" button is a new feature in Qt Creator 3.6. It looks like you are using Qt Creator 3.5 (which is the version that was bundled with Qt 5.5.1)

                                        If you want to use that tutorial as a starting point, you have 2 options:

                                        1. Use the older version of the documentation. In Qt Creator 3.5, click Help -> Index and search for "Creating a Qt Quick Application", OR
                                        2. Go to http://www.qt.io/download-open-source/ and download Qt Creator 3.6 (Note: This means you will have 2 copies of Qt Creator on your system)

                                        Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

                                        1 Reply Last reply
                                        0
                                        • E Offline
                                          E Offline
                                          eureka
                                          wrote on last edited by
                                          #31

                                          As a rank beginner myself I'm following this thread with some interest.
                                          Please view this post as beginner's notes to add to advice you receive from experts.

                                          I had to jump through the same hoops in getting Qt 5.5.1 up and running.
                                          Recently I started on my Qt 5+ learning curve by first installing the older version of Qt 4 from Ubuntu Software Centre. But I soon realised that I needed Qt 5.5.1.
                                          So I uninstalled all older versions of Qt to avoid conflicts and started afresh.
                                          It seems that you are on Windows 64 and previously you installed Qt 5.1.0.
                                          My experiences are on Linux Ubuntu 14.04 32bit.
                                          However I see that you have installed several OS virtual machines including Ubuntu so you could use Ubuntu VM to try the following Qt 5.5.1 installation workflow.

                                          http://softmemos.blogspot.co.uk/2015/11/qt551-on-ubuntu-1404-at-virtualbox.html

                                          Note: VirtualBox is similar to VMWare.

                                          I followed just Step 2A: The easy way
                                          and Qt 5.5.1 was installed successfully in directory /opt/qt55 (I didn't use /opt/qt5.5.1 as suggested).

                                          More details here on Qt 5.5.1 PPA installation on Ubuntu ..
                                          https://launchpad.net/~beineri/+archive/ubuntu/opt-qt551-trusty

                                          After installation run terminal commands

                                          qtchooser -print-env
                                          and
                                          qmake -v

                                          Now since I wanted Python bindings and to use eric6 Python IDE I next installed PyQt5.
                                          https://www.riverbankcomputing.com/software/pyqt/download5
                                          Prerequisites .. qscintilla and eric6 installation advice found here ...
                                          http://stackoverflow.com/questions/30730288/how-do-i-compile-qscintilla-and-eric6-on-linux

                                          After all this I now have under Applications > Programming these launchers

                                          eric6
                                          Qt 5.5 Assistant
                                          Qt 5.5 Creator (this is Qt Creator 3.6.0 based on Qt 5.5.1)
                                          Qt 5.5 Designer
                                          Qt 5.5 Linguist

                                          I use Sublime Text 3 as my editor.

                                          eric6 launches Qt 5.5 Designer from its IDE.
                                          ...

                                          Regarding getting into Qt 5.5.1 I refer to examples in Qt Creator to get an idea of the app layout.
                                          Qt 5 + documentation does seem to be scattered around so it helps to keep notes.
                                          I use CherryTree from http://www.giuspen.com/cherrytree/ as notes manager.
                                          ...

                                          This book can be added to your reading list.
                                          https://qmlbook.github.io/

                                          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