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 overlaps on MAC only
Forum Update on Monday, May 27th 2025

Scroll bar overlaps on MAC only

Scheduled Pinned Locked Moved Unsolved General and Desktop
5 Posts 4 Posters 409 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.
  • H Offline
    H Offline
    Haya
    wrote on last edited by
    #1

    I have a weird behavior on MAC only.
    I use qt with C++.
    When a list requires a scroll bar, the scroll bar overlaps the items in the list.
    On windows it works fine and there is always a small space between the items and the scroll bar, but on MAC, no matter how much I extend the display, they are always overlap.
    I tried to play with setContentsMargins for both the widget and the verticalScrollbar, change the width of the entire widget, and each list item separately, but nothing seems to help.
    Any idea what could increase the space between the items and the scroll bar?

    windows:
    Screenshot 2024-04-10 at 2.46.42 PM.png

    MAC:
    Screenshot 2024-04-10 at 2.27.31 PM.png

    jsulmJ 1 Reply Last reply
    0
    • H Haya

      I have a weird behavior on MAC only.
      I use qt with C++.
      When a list requires a scroll bar, the scroll bar overlaps the items in the list.
      On windows it works fine and there is always a small space between the items and the scroll bar, but on MAC, no matter how much I extend the display, they are always overlap.
      I tried to play with setContentsMargins for both the widget and the verticalScrollbar, change the width of the entire widget, and each list item separately, but nothing seems to help.
      Any idea what could increase the space between the items and the scroll bar?

      windows:
      Screenshot 2024-04-10 at 2.46.42 PM.png

      MAC:
      Screenshot 2024-04-10 at 2.27.31 PM.png

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @Haya What Qt version do you use?
      Is it QListWidget/QListView?

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      H 1 Reply Last reply
      0
      • jsulmJ jsulm

        @Haya What Qt version do you use?
        Is it QListWidget/QListView?

        H Offline
        H Offline
        Haya
        wrote on last edited by
        #3

        @jsulm I'm using QT 5.15.15
        And it is using QTreeView.

        SGaistS 1 Reply Last reply
        0
        • H Haya

          @jsulm I'm using QT 5.15.15
          And it is using QTreeView.

          SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Hi and welcome to devnet,

          Did you build Qt yourself ?
          Can you provide a minimal compilable example that shows this behavior ?

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • W Offline
            W Offline
            Westwhite
            wrote on last edited by Westwhite
            #5

            This has nothing to do with QT, it's the way scroll bars look on recent Macs, when using the trackpad only. When you plug in a mouse, the scrollbars change back to the familiar style.

            I have dialog elements that I want to line up with the contents of a QTableView, but I can't find any dimensions, anywhere that show a difference between the different views, even though they are obviously different sizes. You'd think it would have to be obvious, but none of the widget's dimensions change in any way that I can find.

            I also notice that there are no events reported to the app when the scrollbars change. Just a Paint event. Even though the widget in the scroll area changes size, there is no Resize event.

            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