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. How to make always on top ?
Forum Updated to NodeBB v4.3 + New Features

How to make always on top ?

Scheduled Pinned Locked Moved Solved QML and Qt Quick
6 Posts 2 Posters 1.5k 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.
  • SPlattenS Offline
    SPlattenS Offline
    SPlatten
    wrote on last edited by
    #1

    Is there a way in QML to specify that an image when visible will always be on top ?

    I have images that represent when a data item is stale (stopped being updated for a specific period of time). These images will be made visible when the stale state is true, is there a way that along with setting visible to true I can also make sure that the image appears on top?

    J.HilkJ 1 Reply Last reply
    0
    • SPlattenS SPlatten

      This post is deleted!

      J.HilkJ Offline
      J.HilkJ Offline
      J.Hilk
      Moderators
      wrote on last edited by
      #5

      @SPlatten yes and no

      there's z property which influences the stacking order of siblings. By default it's 0 so everything is drawn from top (qml file) to bottom.

      You can set one z to 1 and it will be drawn on top of every sibling. but there is not automatic to top of stacking order.

      If you end up with multiple siblings with z = 1 you end up with top to bottom order again.

      https://doc.qt.io/qt-6/qml-qtquick-item.html#z-prop


      Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


      Q: What's that?
      A: It's blue light.
      Q: What does it do?
      A: It turns blue.

      SPlattenS 1 Reply Last reply
      0
      • SPlattenS SPlatten

        Is there a way in QML to specify that an image when visible will always be on top ?

        I have images that represent when a data item is stale (stopped being updated for a specific period of time). These images will be made visible when the stale state is true, is there a way that along with setting visible to true I can also make sure that the image appears on top?

        J.HilkJ Offline
        J.HilkJ Offline
        J.Hilk
        Moderators
        wrote on last edited by
        #2

        @SPlatten
        https://doc.qt.io/qt-6/qwidget.html#raise


        Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


        Q: What's that?
        A: It's blue light.
        Q: What does it do?
        A: It turns blue.

        SPlattenS 2 Replies Last reply
        0
        • J.HilkJ J.Hilk

          @SPlatten
          https://doc.qt.io/qt-6/qwidget.html#raise

          SPlattenS Offline
          SPlattenS Offline
          SPlatten
          wrote on last edited by
          #3
          This post is deleted!
          J.HilkJ 1 Reply Last reply
          0
          • J.HilkJ J.Hilk

            @SPlatten
            https://doc.qt.io/qt-6/qwidget.html#raise

            SPlattenS Offline
            SPlattenS Offline
            SPlatten
            wrote on last edited by
            #4

            @J-Hilk , found this:

            https://stackoverflow.com/questions/68707402/how-can-i-raise-a-qml-widget-to-the-top

            Is there any other way of performing the same as raise in QML ?

            1 Reply Last reply
            0
            • SPlattenS SPlatten

              This post is deleted!

              J.HilkJ Offline
              J.HilkJ Offline
              J.Hilk
              Moderators
              wrote on last edited by
              #5

              @SPlatten yes and no

              there's z property which influences the stacking order of siblings. By default it's 0 so everything is drawn from top (qml file) to bottom.

              You can set one z to 1 and it will be drawn on top of every sibling. but there is not automatic to top of stacking order.

              If you end up with multiple siblings with z = 1 you end up with top to bottom order again.

              https://doc.qt.io/qt-6/qml-qtquick-item.html#z-prop


              Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


              Q: What's that?
              A: It's blue light.
              Q: What does it do?
              A: It turns blue.

              SPlattenS 1 Reply Last reply
              0
              • J.HilkJ J.Hilk

                @SPlatten yes and no

                there's z property which influences the stacking order of siblings. By default it's 0 so everything is drawn from top (qml file) to bottom.

                You can set one z to 1 and it will be drawn on top of every sibling. but there is not automatic to top of stacking order.

                If you end up with multiple siblings with z = 1 you end up with top to bottom order again.

                https://doc.qt.io/qt-6/qml-qtquick-item.html#z-prop

                SPlattenS Offline
                SPlattenS Offline
                SPlatten
                wrote on last edited by
                #6

                @J-Hilk , thank you, I will experiment

                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