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. Not getting anywhere (Trying to learn how to do QT via an official tutorial)
Forum Updated to NodeBB v4.3 + New Features

Not getting anywhere (Trying to learn how to do QT via an official tutorial)

Scheduled Pinned Locked Moved General and Desktop
11 Posts 6 Posters 3.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.
  • E Offline
    E Offline
    Easter-Egg-X
    wrote on last edited by
    #1

    I've recently decided to stick with Qt Creator instead of going through the struggle to try compiling QT apps with sublime text, so I figured I needed some kind of tutorial to get started. http://qt-project.org/doc/qt-5/gettingstartedqml.html <- That is what I found. But I am already stuck...´

    My problem is the "label: <text>" part not so far away from the beginning. According to the real-time syntax reader or whatever you call it, that property doesn't exist. Label, that property. I've tried figuring out what the tutorial really wants to say, but I guess I'm better off asking it here instead of going through the unnecessary struggle.

    Could some nice guy or girl help me out?

    1 Reply Last reply
    0
    • JKSHJ Online
      JKSHJ Online
      JKSH
      Moderators
      wrote on last edited by
      #2

      Hi, and welcome to the Qt Dev Net!

      It is unfortunate that the tutorial is badly-written. It is describing a custom Button, not the "official Button":http://qt-project.org/doc/qt-5/qml-qtquick-controls-button.html -- the official Button does not have the "label" property. This is confusing, and should be changed.

      In the meantime, I recommend ignoring that tutorial. Try this one instead: http://qt-project.org/doc/qt-5/qml-tutorial.html

      A few more tips:

      • The easy way to create a new project is, in Qt Creator, click "File" -> "New File or Project..." -> "Applications" -> "Qt Quick Application" and choose "Qt Quick 2.0". Then, edit the 'main.qml' file that is created for you.
      • Run the application by clicking the "Run" button (green arrow), instead of using qmlscene.

      By the way, do you have any preferences on which part of Qt to learn first? Essentially, Qt uses 2 languages: C++ and QML.

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

      1 Reply Last reply
      0
      • A Offline
        A Offline
        ankursaxena
        wrote on last edited by
        #3

        u can get tutorial from qt creator itself. Just click on help option. and all the documentation is available there and examples also. u can get it from there.

        1 Reply Last reply
        0
        • IamSumitI Offline
          IamSumitI Offline
          IamSumit
          wrote on last edited by
          #4

          Hiii Easter-Egg-X,

          You are using Qt 5 ,so the contents on Qt 5 is not much available on internet even there is no book on Qt 5. It is under processed I hope so.
          see this link--> you can get some suggestions.
          http://qt-project.org/forums/viewthread/35794/

          hope it will help you.

          Be Cute

          1 Reply Last reply
          0
          • A Offline
            A Offline
            ankursaxena
            wrote on last edited by
            #5

            http://www.bogotobogo.com/Qt/Qt5_Creating_QtQuick2_QML_Application_Animation_A.php Its not official. but yea.. till an extend its a good tutorial.

            1 Reply Last reply
            0
            • E Offline
              E Offline
              Easter-Egg-X
              wrote on last edited by
              #6

              Thanks for your will to help me out guys. I'll see what other tutorials I can find out there, but meanwhile, I'll finish the tutorial JKSH gave me.

              [quote author="JKSH" date="1392772129"]Hi, and welcome to the Qt Dev Net!

              It is unfortunate that the tutorial is badly-written. It is describing a custom Button, not the "official Button":http://qt-project.org/doc/qt-5/qml-qtquick-controls-button.html -- the official Button does not have the "label" property. This is confusing, and should be changed.

              In the meantime, I recommend ignoring that tutorial. Try this one instead: http://qt-project.org/doc/qt-5/qml-tutorial.html

              A few more tips:

              • The easy way to create a new project is, in Qt Creator, click "File" -> "New File or Project..." -> "Applications" -> "Qt Quick Application" and choose "Qt Quick 2.0". Then, edit the 'main.qml' file that is created for you.
              • Run the application by clicking the "Run" button (green arrow), instead of using qmlscene.

              By the way, do you have any preferences on which part of Qt to learn first? Essentially, Qt uses 2 languages: C++ and QML.[/quote]

              I dunno, I've already started reading the tutorial (which is much easier to understand than my previous one) and am getting a clearer picture of how QML is, and my impression is that it's good.

              I think I will start getting in depth with the QT language first, then try integrating C++ into my applications. You can't reach it's fullest potential unless you combine the two languages, right?

              1 Reply Last reply
              0
              • JKSHJ Online
                JKSHJ Online
                JKSH
                Moderators
                wrote on last edited by
                #7

                [quote]I think I will start getting in depth with the QT language first, then try integrating C++ into my applications. You can’t reach it’s fullest potential unless you combine the two languages, right?[/quote]It depends on what you want to do :)

                Qt began as a C++ library. Its C++ features are very mature, and you can create powerful apps using C++ alone. To create a GUI in C++, you can use "Qt Widgets":http://qt-project.org/doc/qt-5/qtwidgets-index.html. This is good for traditional, office-style desktop GUIs.

                QML is the exciting new technology that's designed for creating modern, smartphone-style GUIs. However, you can also use it to create traditional-style GUIs. You can also easily embed JavaScript code for logic, so you can create powerful apps using QML alone (example: http://qt-project.org/doc/qt-5/qml-advtutorial.html )

                The current recommendation for high-performance apps is to create your GUI with QML, and write your logic in C++. In can be tricky to get started, but once you understand it it's easy to combine QML and C++: http://qt-project.org/doc/qt-5/qtqml-cppintegration-topic.html

                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
                  Easter-Egg-X
                  wrote on last edited by
                  #8

                  [quote author="JKSH" date="1393036489"][quote]I think I will start getting in depth with the QT language first, then try integrating C++ into my applications. You can’t reach it’s fullest potential unless you combine the two languages, right?[/quote]It depends on what you want to do :)

                  Qt began as a C++ library. Its C++ features are very mature, and you can create powerful apps using C++ alone. To create a GUI in C++, you can use "Qt Widgets":http://qt-project.org/doc/qt-5/qtwidgets-index.html. This is good for traditional, office-style desktop GUIs.

                  QML is the exciting new technology that's designed for creating modern, smartphone-style GUIs. However, you can also use it to create traditional-style GUIs. You can also easily embed JavaScript code for logic, so you can create powerful apps using QML alone (example: http://qt-project.org/doc/qt-5/qml-advtutorial.html )

                  The current recommendation for high-performance apps is to create your GUI with QML, and write your logic in C++. In can be tricky to get started, but once you understand it it's easy to combine QML and C++: http://qt-project.org/doc/qt-5/qtqml-cppintegration-topic.html[/quote]

                  Yes indeed it's tricky getting started, but now I'm talking about even solely combining QML with JS. I had a look at using Qt Widgets but I gave up, I felt way too overwhelmed... so I decided to just accept the fact that I may not be ready for that yet, so I thought QML+JS would be a good start since I have experience with javascript (although I've forgot most of it. It's been like half a year since I last used that language, and I only used that for specifically that occasion since I had to use it for AJAX) Now it seems like I'm even too stupid to grasp the basics of the framework. I'm on the verge of giving up. (Well, not really, but I'm just feeling overwhelmed yet again. I'm still trying to figure out how to do what I want to achieve)

                  I don't really know what I am doing wrong here... still getting nowhere although I really want to make coding into a habit so I have something to do during my free-times. I could really use some extra tips.

                  1 Reply Last reply
                  0
                  • B Offline
                    B Offline
                    Bidochon
                    wrote on last edited by
                    #9

                    My advise (as I'm pretty much in the same stage as you… as I just started to learn QML and I am still scare of the C++ side) is to look at what you already achieved. I still have the feeling that QML is a mountain in front of me…but when I look behind, I realize that I'm not in the valley anymore (I have a rough idea of how it works, not scare of the QML style anymore, know how to run a QML code…etc). So don't give up, keep climbing… even if it's slow…. everything step you make (as little as it can be) brings you closer to the top.

                    Right now, I'm trying to understand what is going on in the QML tutorials (like calc, text editor….). I comment out some of the lines and see what happens…. and my goal, is to start writing a very simple application within a few weeks.

                    1 Reply Last reply
                    0
                    • F Offline
                      F Offline
                      frankiefrank
                      wrote on last edited by
                      #10

                      The first thing I did when I started with QML was watching this video from Dev Days:
                      http://www.youtube.com/watch?v=WBf9TbzHBfk

                      And I see there is even a more recent one:
                      http://www.youtube.com/watch?v=Zna1KHQj_8Y

                      Good luck, hope it helps.

                      Some parts of QML are a bit "magical", so I think these videos help out by actually showing what you can do and how. I wouldn't have guessed about some of these.

                      "Roads? Where we're going, we don't need roads."

                      1 Reply Last reply
                      0
                      • E Offline
                        E Offline
                        Easter-Egg-X
                        wrote on last edited by
                        #11

                        [quote author="Bidochon" date="1393424983"]My advise (as I'm pretty much in the same stage as you… as I just started to learn QML and I am still scare of the C++ side) is to look at what you already achieved. I still have the feeling that QML is a mountain in front of me…but when I look behind, I realize that I'm not in the valley anymore (I have a rough idea of how it works, not scare of the QML style anymore, know how to run a QML code…etc). So don't give up, keep climbing… even if it's slow…. everything step you make (as little as it can be) brings you closer to the top.

                        Right now, I'm trying to understand what is going on in the QML tutorials (like calc, text editor….). I comment out some of the lines and see what happens…. and my goal, is to start writing a very simple application within a few weeks. [/quote]

                        Good news is that I've overcome the worst, and I wish you the best of luck too. What I did was forgetting about the javascript part and changed my mindset to just focus on pure QML. I'm finally starting to get a hang of how it possibly could cooperate with other languages such as JS and C++.

                        It's a good idea to not aim too high and get a feel for what is possible for us to accomplish with the current knowledge and skill. I'm 100% sure there will be more problems to tackle in the future and it could indeed be a scary experience, but the important thing is to be persistent, just like before. I mean, I did get past these overwhelming parts, so why wouldn't I in the future?

                        And if I ever start feeling too overwhelmed by waves of "No, this is not possible" and it's becoming a dominant thought inside of me, then it's probably a good idea to just forget about it and start on something else, whether it would be aiming lower or going on to other stuff I enjoy to do.

                        Again, wish you the best.

                        [quote author="frankiefrank" date="1393425861"]The first thing I did when I started with QML was watching this video from Dev Days:
                        http://www.youtube.com/watch?v=WBf9TbzHBfk

                        And I see there is even a more recent one:
                        http://www.youtube.com/watch?v=Zna1KHQj_8Y

                        Good luck, hope it helps.

                        Some parts of QML are a bit "magical", so I think these videos help out by actually showing what you can do and how. I wouldn't have guessed about some of these.[/quote]

                        Awesome, thanks a bunch. I'll check em out.

                        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