Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. "Very New to QTquick" ..Hit a snag with label: ?
Forum Updated to NodeBB v4.3 + New Features

"Very New to QTquick" ..Hit a snag with label: ?

Scheduled Pinned Locked Moved QML and Qt Quick
4 Posts 2 Posters 1.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.
  • O Offline
    O Offline
    oORiggsOo
    wrote on last edited by
    #1

    Hi,

    I'm a complete newcomer to Qt Quick and I hit a snag following the "Getting Started Programing with Qt Quick" from QTDoc 5.2
    I've installed the complete online down load options for qt, and qtcreator 5.2.0.

    In the section "Creating a Menu Page"
    label: in the Button {...} throws a "Invalid property name 'label' (M16)

    Other then that it runs, just the label on the buttons continue on from the Button.qml file Text{}

    Don't know what I've missed gone over my code, Hope some one can point me in the write direction.

    Thanks

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

      Hi,

      -It looks like the documentation has some errors in it. The Button QML type was updated in Qt 5, but they forgot to update that example. Replace "label" with "text", and you should be fine :)-

      -Thanks for bringing this up; I'll have it fixed.-

      -You can see the latest Button documentation at http://qt-project.org/doc/qt-5/qml-qtquick-controls-button.html-

      EDIT: Whoops, I misunderstood that example. It DOESN'T refer to the built-in "Button":http://qt-project.org/doc/qt-5/qml-qtquick-controls-button.html provided by Qt, but instead it asks readers to implement their own Button. Please ignore what I wrote above.

      Anyway, that page does not show all the code used to create the example, it only discusses the important parts of the code. The code is in your Qt installation for you to study -- somewhere like C:\Qt\5.2.0\msvc2012_64_opengl\examples\quick\tutorials\gettingStartedQml\core\Button.qml. You can find the full Button code here, which declares the "label" property.

      May I ask how you are running the example?

      IMHO, this example is rather complicated for a "getting started" tutorial. I'd start with http://qt-project.org/doc/qt-5/qml-tutorial.html instead.

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

      1 Reply Last reply
      0
      • O Offline
        O Offline
        oORiggsOo
        wrote on last edited by
        #3

        Yes I found The examples/... /Button.qml
        Thank you very much :)

        Desktop QT 5.2.0 GCC 64 bit on SuseLinux
        I've gone through the qml-tutorials, but this was the first thing that I ran into that popped up and gave me any trouble. As for running the example I just followed along adding in the code. Each example is an addition to the file being worked on. Have to fill in the rest. And ya I missed some of the code. :)

        The code runs but if you comment the label: out it uses the default from the button , each button was named the same .

        I'm interested In qml/c++ and qtquick seems fun!
        Again thanks for the path nice to see the whole concept.

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

          You're welcome. :)

          Happy coding!

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

          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