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. One QHeaderView for multiple view
QtWS25 Last Chance

One QHeaderView for multiple view

Scheduled Pinned Locked Moved Unsolved General and Desktop
qheaderviewqtableview
2 Posts 2 Posters 400 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.
  • D Offline
    D Offline
    dridk2
    wrote on last edited by dridk2
    #1

    Hi,

    I have a widget with 2 view in vertical splitter.
    I would like to have a common HeaderView for both ( resizable ... )
    Unfortunally, when I plug a common headerview into both view using setHorizontalHeader, the header is displayed only on the second one.
    Do you have a solution ? Or maybe another GUI design pattern suggestion . The bottom view changes when an item is selected on the top view.

    6b97974e-45fd-4a34-98c8-9fa724c1e6a0-image.png

    1 Reply Last reply
    0
    • Chris KawaC Offline
      Chris KawaC Offline
      Chris Kawa
      Lifetime Qt Champion
      wrote on last edited by
      #2

      QHeaderView is a widget. You can't have one widget in two places at the same time.
      You can have two header views and sync them on change.

      1 Reply Last reply
      4

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved