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. Tutorial QML is missing 2 things: where to start and how to run !
Qt 6.11 is out! See what's new in the release blog

Tutorial QML is missing 2 things: where to start and how to run !

Scheduled Pinned Locked Moved General and Desktop
19 Posts 7 Posters 5.1k 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.
  • R Offline
    R Offline
    realtebo
    wrote on last edited by
    #1

    I'm referring to this:
    https://qt-project.org/doc/qt-5.1/qtquick/qml-tutorial1.html

    I'm downloading Qt just now for the first time.
    The tutorial start with code, but ... where must i write this ?

    After the 3rd page, the first app is complete. But.. how to compile and run ?

    Why Qt doc is so ... poor ?

    1 Reply Last reply
    0
    • B Offline
      B Offline
      belab
      wrote on last edited by
      #2

      Come on, it's so easy. Take a look at the bottom of the page at "Viewing the example".
      ...For example, to run the provided completed Tutorial 1 example from the install location, you would type:
      qmlscene tutorials/helloworld/tutorial1.qml...

      1 Reply Last reply
      0
      • R Offline
        R Offline
        realtebo
        wrote on last edited by
        #3

        Uhm... I loaded from the QtCreator "Application Exampl"

        I click 'Run' and it told me :
        ":-1: error: Qt Creator needs a compiler set up to build. Configure a compiler in the kit options."

        ... This is my OOBE (Out of box experience)...

        I'll try to install 'some other components' from package manager.

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

          [quote author="realtebo" date="1374180436"]I'm referring to this:
          https://qt-project.org/doc/qt-5.1/qtquick/qml-tutorial1.html
          I'm downloading Qt just now for the first time.
          The tutorial start with code, but ... where must i write this ?

          After the 3rd page, the first app is complete. But.. how to compile and run ?
          Why Qt doc is so ... poor ?[/quote]

          Hi,

          • First, any text editor can be used to create the .qml file. such as notepad.exe, gedit, kwrite, ...

          • Then, pass the .qml file to the qmlscene tool

          That's all.

          1 Reply Last reply
          0
          • D Offline
            D Offline
            dbzhang800
            wrote on last edited by
            #5

            [quote author="realtebo" date="1374182981"]Uhm... I loaded from the QtCreator "Application Exampl"

            I click 'Run' and it told me :
            ":-1: error: Qt Creator needs a compiler set up to build. Configure a compiler in the kit options."

            ... This is my OOBE (Out of box experience)...

            I'll try to install 'some other components' from package manager. [/quote]

            Hi, which type of application are you trying to open?

            • Qt Quick UI
            • Qt Quick Application

            The former contains .qml/.js files only, no compiler is needed, can be run through qmlscene

            The latter contians .qml/.js files and .cpp/.h files, they should be compiled to generate a exe file, which can be run by double click.

            1 Reply Last reply
            0
            • S Offline
              S Offline
              stereomatching
              wrote on last edited by
              #6

              File->Open File or Project->Qt Quick2 application(build in type)

              Write your codes, and click run, well to go

              If you need better control, please google how to use qmake

              1 Reply Last reply
              0
              • R Offline
                R Offline
                realtebo
                wrote on last edited by
                #7

                I've opened an example named "Application Example", so I think is a Qt Application, NOT a Quick, but when i press the red 'Play' button, it complain about compiler .... I'll retry to reinstall ...

                1 Reply Last reply
                0
                • JKSHJ Offline
                  JKSHJ Offline
                  JKSH
                  Moderators
                  wrote on last edited by
                  #8

                  Two questions:

                  Which build of Qt did you install?

                  Do you have a compiler that matches your answer for question #1?

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

                  1 Reply Last reply
                  0
                  • R Offline
                    R Offline
                    realtebo
                    wrote on last edited by
                    #9
                    1. I downloaded the latest qt installer, so I think it's the lates Qt stable build
                    2. I've no idea where can I found an answer to question #1. It's the reason I asked here... I downloaded, opened, run, ... error .... This evening (in Italy), I'll retry a full reinstall, but, I repeat, that's a completly negative OOBE.
                    1 Reply Last reply
                    0
                    • SGaistS Offline
                      SGaistS Offline
                      SGaist
                      Lifetime Qt Champion
                      wrote on last edited by
                      #10

                      You can find which version you have in the installer name. Also if It asks you for a compiler you likely have installed one of the MSVC flavor which requires that you have the according Visual Studio installed. If you don't want that go for the mingw version which have the compiler bundled.

                      Hope it helps

                      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
                      0
                      • JKSHJ Offline
                        JKSHJ Offline
                        JKSH
                        Moderators
                        wrote on last edited by
                        #11

                        [quote author="realtebo" date="1374219330"]1. I downloaded the latest qt installer, so I think it's the lates Qt stable build
                        2. I've no idea where can I found an answer to question #1. It's the reason I asked here... I downloaded, opened, run, ... error ....[/quote]By "which build did you install?", I meant which one of these did you install?:

                        • 32-bit, MinGW 4.8, OpenGL?
                        • 32-bit VS 2010?
                        • 32-bit VS 2010, OpenGL?
                        • 64-bit VS 2012?
                        • 64-bit VS 2012, OpenGL?
                        • etc.

                        If you download "Qt 5.1.0 for Windows 32-bit (VS 2010, 505 MB)", then you'll need to download the 32-bit Visual Studio 2010 compiler from Microsoft too.

                        On the other hand, if you download "Qt 5.1.0 for Windows 32-bit (MinGW 4.8, OpenGL, 666 MB)", you don't need to download a separate compiler because it is already included in the package (the downloads page says "The MinGW binary package includes a 32 bit MinGW-builds (gcc 4.8.0, dwarf exception handing, posix threading) toolchain")

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

                        1 Reply Last reply
                        0
                        • L Offline
                          L Offline
                          leo4as
                          wrote on last edited by
                          #12

                          [quote author="realtebo" date="1374182981"]Uhm... I loaded from the QtCreator "Application Exampl"

                          I click 'Run' and it told me :
                          ":-1: error: Qt Creator needs a compiler set up to build. Configure a compiler in the kit options."

                          ... This is my OOBE (Out of box experience)...

                          I'll try to install 'some other components' from package manager. [/quote]

                          Just install a compiler like g++
                          sudo apt-get install g++

                          leo4as

                          1 Reply Last reply
                          0
                          • S Offline
                            S Offline
                            stereomatching
                            wrote on last edited by
                            #13

                            Please tell us which OS you are using and show us the link of the
                            Qt you download.

                            1 Reply Last reply
                            0
                            • R Offline
                              R Offline
                              realtebo
                              wrote on last edited by
                              #14

                              I downloaded

                              http://download.qt-project.org/official_releases/online_installers/qt-windows-opensource-1.4.0-x86-online.exe

                              I re-installed with ALL of mingW and VC I've seen.
                              The problem is still here.

                              1 Reply Last reply
                              0
                              • R Offline
                                R Offline
                                realtebo
                                wrote on last edited by
                                #15

                                This evening i'll retry removing ALL and then installing a clean version using a precise installer, not the installer. Sorry for time lost.

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

                                  Even with the online installer, only install one version of Qt.

                                  Also, I would recommend you choose one with MinGW, so you won't have to install an additional compiler

                                  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
                                  0
                                  • JKSHJ Offline
                                    JKSHJ Offline
                                    JKSH
                                    Moderators
                                    wrote on last edited by
                                    #17

                                    [quote author="SGaist" date="1374237696"]Even with the online installer, only install one version of Qt.[/quote]Agreed. This will minimize the risk of your system mixing versions together (installing all of them makes things harder, not easier)

                                    [quote author="SGaist" date="1374237696"]Also, I would recommend you choose one with MinGW, so you won't have to install an additional compiler[/quote]Almost. In the online installer, you'll need to select the MinGW compiler to download it. (The difference with MSVC is that you'll need to go to the Microsoft website to get MSVC -- MinGW can be obtained through this installer)

                                    [quote author="realtebo" date="1374237102"]This evening i'll retry removing ALL and then installing a clean version using a precise installer, not the installer. Sorry for time lost.[/quote]Good idea. These are the recommended options:
                                    !http://i.imgur.com/LfwIYiS.png(Qt 5 Online MinGW options)!

                                    Don't worry about time lost; the first step is always the hardest. Things will get much nicer later :)

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

                                    1 Reply Last reply
                                    0
                                    • S Offline
                                      S Offline
                                      stereomatching
                                      wrote on last edited by
                                      #18

                                      Maybe Qt should have a better guide to show the users how to install, compile, link and execute the program step by step on three platforms--windows, mac and linux?Better document could help many users get into the realm of Qt(like how to install Qt with graphics).

                                      Like bjarne said, even c++ is a huge and complicated language, when we get used to it, we may treat those "arcane" concepts or syntax in c++ as "basic staffs", but they are still "arcane creatures" for others(I forgot the original words, but the meaning should be the same).How to setup Qt under different environment is the same, especially today there are many classes don't teach students(I am one of them, since I am not a CS student but an EE student, this may make sense) what is the relationship between linker, compiler and makefile, they just give them an IDE and show them how to codes.

                                      1 Reply Last reply
                                      0
                                      • R Offline
                                        R Offline
                                        realtebo
                                        wrote on last edited by
                                        #19

                                        @JKSH JKSH Ah ... a picture has more value than one houndred words !!! Thanks

                                        Now I'll remove ALL and reinstall like received suggestion

                                        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