Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Scroll bar difference in Qt5 and Qt6
Qt 6.11 is out! See what's new in the release blog

Scroll bar difference in Qt5 and Qt6

Scheduled Pinned Locked Moved Unsolved General and Desktop
1 Posts 1 Posters 186 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.
  • A Offline
    A Offline
    AnandaCS
    wrote on last edited by
    #1

    Hello,
    I see difference in Scroolbar in Qt6 vs QT5.
    In QT5 scrollbar is disappearing once we stop operating but in Qt6 scrollbar is always appear.
    dc550da9-c11d-49a9-a425-32b9b17c8025-image.png
    import QtQuick 2.12
    import QtQuick.Controls 2.0

    ApplicationWindow {
    id : appWindow
    objectName: "appWindow"
    visible: true
    width: 640
    height: 300
    title: "QML Window Example Qt5"
    property int i : 0
    TableView {
    anchors.fill: parent
    columnSpacing: 1
    rowSpacing: 1
    clip: true
    ScrollBar.vertical: ScrollBar {
    width:20
    }
    model: tableModel
    delegate: Rectangle {
    implicitWidth: 100
    implicitHeight: 50
    Text {
    text: display
    }
    }
    }

    Rectangle {
    id: rect
    width: 100
    height: 200
    anchors.bottom : parent.bottom
    color: "red"
    Text {
    text: "Add"
    anchors.centerIn: parent
    MouseArea {
    anchors.fill: parent
    onClicked: {
    tableModel.append({display: "Item " + appWindow.i})
    appWindow.i++
    }
    }
    }
    }
    }

    03f91770-a36f-4d36-8ae3-811335b9ee25-image.png

    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