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. Have vertical scrollbar below horizontal qheaderview
Forum Updated to NodeBB v4.3 + New Features

Have vertical scrollbar below horizontal qheaderview

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 3 Posters 361 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.
  • JoeCFDJ Offline
    JoeCFDJ Offline
    JoeCFD
    wrote on last edited by JoeCFD
    #1

    Is there a way to set this? By default, vertical scrollbar goes all way up to the top of qtablewidget. QHeaderview does not need to be included for scrolling.

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      AFAIK, no. You would have to implement that yourself.

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

      JoeCFDJ 1 Reply Last reply
      0
      • SGaistS SGaist

        Hi,

        AFAIK, no. You would have to implement that yourself.

        JoeCFDJ Offline
        JoeCFDJ Offline
        JoeCFD
        wrote on last edited by
        #3

        @SGaist Sure I can. It would be nice to have it by a single func call.

        1 Reply Last reply
        0
        • S Offline
          S Offline
          SimonSchroeder
          wrote on last edited by
          #4

          One mediocre fix would be to set the stylesheet of the vertical scoll bar to have enough padding at the top. However, this will not extend the header view all the way to the right.

          Another quick hack would be the following:

          • permanently disable the vertical scrollbar of the table widget
          • create your own QScrollBar which you place perfectly on top of the QTableWidget
          • subscribe to the the table widget's resize and move events to resize and move your scrollbar accordingly (use inheritance or use installEventFilter() to be notified of size/position changes)
          • connect your own scrollbar back to the table widget
          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