Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Forum Updated on Feb 6th

    Solved QTreeView problems with horizontal scrollbar

    General and Desktop
    2
    3
    1353
    Loading More Posts
    • 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 Former User last edited by

      Hello,
      I've inherited from QTreeView, but horizontal scrollbar is invisible even though the treeview is resized to smaller than content, but vertical scrollbar is working fine. I've set the property "setHeaderHidden()" to true. Does this effect the horizontal scroll bar.?

      Thanks for your time.

      1 Reply Last reply Reply Quote 0
      • SGaist
        SGaist Lifetime Qt Champion last edited by

        Hi,

        No it should not. What other modifications did you do ?
        How are you setting up your model ?

        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 Reply Quote 0
        • ?
          A Former User last edited by

          I figured out what was missing, i din't override resizeEvent() & i set "setHeaderHidden()" to true which hides headers. So, i just override the resizeEvent() & called the slot "resizeColumnToContents(0)" as i've only one column and scroll bars are shown as needed (default behavior).
          Thanks guys & specially @SGaist

          1 Reply Last reply Reply Quote 0
          • First post
            Last post