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. [QT Bug? ] Layering of custom QQuickItem-based qml item and built-in qml items
Forum Updated to NodeBB v4.3 + New Features

[QT Bug? ] Layering of custom QQuickItem-based qml item and built-in qml items

Scheduled Pinned Locked Moved QML and Qt Quick
3 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
    okinp
    wrote on 7 May 2013, 13:26 last edited by
    #1

    Hello,

    I have a problem that I am trying to solve and I've now started to believe its a bug.
    I have created an item named "Node" that is derived from QQuickItem and draws a circle.

    If I do something like:

    @
    Item {
    Rectangle {
    x: 50
    y: 50
    width: 100
    height: 100
    color: "#FFFF0000"
    }

    Node {
        x: 100
        y: 100
        radius: 20
        color: "#FFFFCC00"
    }
    

    }
    @

    The Node item is drawn below the Rectangle which is not what is expected. The ordering doesn't change even if I change the z-value of the Node.

    If I do something like:

    @
    Item {
    Node{
    x: 50
    y: 50
    radius: 100
    color: "#FFFF0000"
    }

        Node {
            x: 100
            y: 100
            radius: 20
            color: "#FFFFCC00"
        }
    }
    

    @
    Then the expected ordering is followed.
    Could this be a QT bug or am I making some silly mistake??

    Thanks!

    -Nik.

    1 Reply Last reply
    0
    • S Offline
      S Offline
      sierdzio
      Moderators
      wrote on 7 May 2013, 13:38 last edited by
      #2

      Interesting. What happens when you do this (reparent Node as a kid of Rectangle):
      @
      Rectangle {
      x: 50
      y: 50
      width: 100
      height: 100
      color: "#FFFF0000"

      Node {
          x: 100
          y: 100
          radius: 20
          color: "#FFFFCC00"
      }
      

      }
      @

      (Z(:^

      1 Reply Last reply
      0
      • O Offline
        O Offline
        okinp
        wrote on 7 May 2013, 13:44 last edited by
        #3

        Trying this:

        @ Rectangle {
        x: 50
        y: 50
        width: 100
        height: 100
        color: "#FFFF0000"

            Node {
                x: 80
                y: 80
                radius: 20
                color: "#FFFFCC00"
            }
        }
        

        @

        Still renders Node behind the rectangle...

        Edit:
        I just submitted the problem to the QT Bug Tracker: https://bugreports.qt-project.org/browse/QTBUG-31043
        Hopefully this will get a high priority and will get fixed soon...

        -Nik.

        1 Reply Last reply
        0

        1/3

        7 May 2013, 13:26

        • Login

        • Login or register to search.
        1 out of 3
        • First post
          1/3
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved