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. Qt SDK 1.2.1: QTreeView: scrollbars always visible after setting its columns' width
Forum Updated to NodeBB v4.3 + New Features

Qt SDK 1.2.1: QTreeView: scrollbars always visible after setting its columns' width

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

    Hi, I am using Qt SDK 1.2.1 (i.e. Qt 4.8.1) with MSVC on Windows and, in my application, I keep track of the width of the different columns I have in a QTreeView object.

    Now, say that I start my application, resize the columns to be of the width I want, and then make sure that the scrollbars are not necessary (and therefore not visible). Say then that I close my application (thus having the width of my QTreeView object's columns saved using QSettings) and restart it. Upon restarting, my application will retrieve the aforementioned widths and set them as my QTreeView object's columns' width.

    The result is as expected on Linux and OS X, i.e. my QTreeView object's columns are of the correct size and none of the scrollbars are visible. On Windows, the columns are properly resized too, but the scrollbars are also visible while there is, in effect, no need for them.

    Could it be that I missed something very obvious somewhere or is there really something 'wrong' with QTreeView on Windows? Right now, I am using a hack to get what I consider to be the expected behaviour (I decrease the width of the last column thus preventing the scrollbars from being considered necessary), but I really don't like having to do that.

    Anyway, as always, any help with this would be much appreciated...

    Cheers, Alan.

    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