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. Use of a control property causes [undefined]
Forum Updated to NodeBB v4.3 + New Features

Use of a control property causes [undefined]

Scheduled Pinned Locked Moved Solved QML and Qt Quick
qtquickraspberry
2 Posts 1 Posters 1.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.
  • S Offline
    S Offline
    swegmann
    wrote on last edited by A Former User
    #1

    I created a component that roughly looks like the following

    Rectangle {
        property string title_label
        Item {
            RowLayout {
                Text {
                    text: title_label
                }
            }
        }
    }
    

    In my Visual Studio and MinGW builds this works perfectly. However when build it for Raspberry Pi with a Qt 5.3.3 I get an "Unable to assign [undefined] to QString" for the line 7.

    When I replace that line with something ugly like this:

    text: parent.parent.parent.title_label
    

    then the issue vanishes. I also tried giving the top rectangle an id like 'root' and then refer to title_label using this id:

    Rectangle {
        id: root
        ...
        ...
                  text: root.title_label
        ...
    

    But this also didn't solve the problem.

    Can anyone tell where this could come from?

    1 Reply Last reply
    0
    • S Offline
      S Offline
      swegmann
      wrote on last edited by
      #2

      For me this issue is resolved now by using the newest Qt Version (I used the 5.5.0 branch) on the Raspberry Pi. It looks like it might have also been related to other issues on the RaspberryPi like http://forum.qt.io/topic/50854/raspberry-pi-and-stackview/2 or https://bugreports.qt.io/browse/QTBUG-44295 since I was also using the StackView control.

      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