Important: Please read the Qt Code of Conduct -

ScrollView include elements that aren't children

  • I need to include a rectangle in the scrollbar area, I can drag it from the header to the content of the page, then this will work, but I need this rectangle exactly in the header(I need this rectangle on several pages).

    ApplicationWindow {
        id: appwindowwindow
        width: 800
        height: 600
        header: Item
          id: item
          width: appwindow.width
          Rectangle  {
                   id: myRec
                   width: 300
                   height: 200
                   radius: 2
          ScrollView {
                  id: scroll
                  ScrollBar.vertical.policy: ScrollBar.AlwaysOn
                  ScrollBar.horizontal.policy: ScrollBar.AlwaysOff
                  ScrollBar.vertical.interactive: true
                id: firstPage
                ColumnLayout  {
                              //there are many objects     

Log in to reply