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. QtQuickControl 2: Drawer remains under WebView
Forum Updated to NodeBB v4.3 + New Features

QtQuickControl 2: Drawer remains under WebView

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
6 Posts 4 Posters 1.7k Views 2 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.
  • I Offline
    I Offline
    Ibrahim
    wrote on last edited by
    #1

    Hi; My QML code is here:

    ApplicationWindow {
      visible: true
      width: 640
      height: 480
      title: qsTr("Hello World")
    
      header: ToolBar {
        Material.primary: Material.Green
    
        Label {
          text: qsTr("QtMobileApp")
          color: "#FFFFFF"
          font.bold: true
        }
      }
    
      Drawer {
        id: drawer
        width: parent.width * 0.66
        height: parent.height
        background: Rectangle {
          anchors.fill: parent
          color: "#333333"
        }
      }
    
      WebView {
        id: webView
        url: "https://www.ubuntu.com/"
        anchors.fill: parent
      }
    }
    

    But the drawer remains under WebView like this:
    alt text
    How can I bring the top to Drawer? Thanks.

    1 Reply Last reply
    0
    • sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      This will probably fail, but you can try to move Drawer declaration (in QML file) below WebView - this will result in Drawer getting higher "z" value.

      (Z(:^

      I 1 Reply Last reply
      0
      • sierdzioS sierdzio

        This will probably fail, but you can try to move Drawer declaration (in QML file) below WebView - this will result in Drawer getting higher "z" value.

        I Offline
        I Offline
        Ibrahim
        wrote on last edited by
        #3

        @sierdzio it's not working.

        ekkescornerE 1 Reply Last reply
        0
        • I Ibrahim

          @sierdzio it's not working.

          ekkescornerE Offline
          ekkescornerE Offline
          ekkescorner
          Qt Champions 2016
          wrote on last edited by
          #4

          @Ibrahim just tried. doesn't work - even with higher z. you should open a bugreport.

          ekke ... Qt Champion 2016 | 2024 ... mobile business apps
          5.15 --> 6.9 https://t1p.de/ekkeChecklist
          QMake --> CMake https://t1p.de/ekkeCMakeMobileApps

          1 Reply Last reply
          0
          • S Offline
            S Offline
            Schluchti
            wrote on last edited by
            #5

            Could be related to that:

            Note: Due to platform limitations overlapping the WebView and other QML components is not supported.

            See: http://doc.qt.io/qt-5/qml-qtwebview-webview.html

            Want to read more about Qt?

            https://gympulsr.com/blog/qt/

            Latest Article: https://gympulsr.com/blog/qt/2017/06/14/ios-background-music-qt.html

            ekkescornerE 1 Reply Last reply
            0
            • S Schluchti

              Could be related to that:

              Note: Due to platform limitations overlapping the WebView and other QML components is not supported.

              See: http://doc.qt.io/qt-5/qml-qtwebview-webview.html

              ekkescornerE Offline
              ekkescornerE Offline
              ekkescorner
              Qt Champions 2016
              wrote on last edited by
              #6

              @Schluchti makes sense. then I would try to watch position of Drawer and move the WebView so there's no overlapping.
              haven't done this yet because I normaly don't use WebView

              ekke ... Qt Champion 2016 | 2024 ... mobile business apps
              5.15 --> 6.9 https://t1p.de/ekkeChecklist
              QMake --> CMake https://t1p.de/ekkeCMakeMobileApps

              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