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. Rectangle covering Page header?
Forum Updated to NodeBB v4.3 + New Features

Rectangle covering Page header?

Scheduled Pinned Locked Moved Solved QML and Qt Quick
4 Posts 3 Posters 411 Views
  • 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.
  • C Offline
    C Offline
    christofer
    wrote on last edited by
    #1

    Hi,

    I'm making a custom modal dialog widget. The normal Dialog won't work because we don't want the title-bar and we want more control over the look and feel. My screen is a Page with a header, some content, and then a Rectangle that is visible: false, color: "#85000000", z: 80, anchors.fill: parent, and mouse area to trap clicks. The modal behavior is working but I can't get the rectangle to cover the Page's header. Is there a way to get a Rectangle to cover the Page's header?

    Thanks,
    -chris

    1 Reply Last reply
    0
    • MarkkyboyM Offline
      MarkkyboyM Offline
      Markkyboy
      wrote on last edited by
      #2

      Post your code :)

      Don't just sit there standing around, pick up a shovel and sweep up!

      I live by the sea, not in it.

      1 Reply Last reply
      0
      • M Offline
        M Offline
        Mammamia
        wrote on last edited by
        #3

        @christofer That is because the Rectangle is parented to the content area.

        either you can create your own custom Popup instead of the Rectangle

        or

        set the Rectangle's parent as parent: Overlay.overlay

        Ref: Overlay

        Overlay provides a layer for popups, ensuring that popups are displayed above other content and that the background is dimmed when a modal or dimmed popup is visible.
        
        The overlay is an ordinary Item that covers the entire window. It can be used as a visual parent to position a popup in scene coordinates.
        
        C 1 Reply Last reply
        1
        • M Mammamia

          @christofer That is because the Rectangle is parented to the content area.

          either you can create your own custom Popup instead of the Rectangle

          or

          set the Rectangle's parent as parent: Overlay.overlay

          Ref: Overlay

          Overlay provides a layer for popups, ensuring that popups are displayed above other content and that the background is dimmed when a modal or dimmed popup is visible.
          
          The overlay is an ordinary Item that covers the entire window. It can be used as a visual parent to position a popup in scene coordinates.
          
          C Offline
          C Offline
          christofer
          wrote on last edited by
          #4

          @Mammamia Thank you! This is exactly what I was missing.

          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