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
Forum Updated to NodeBB v4.3 + New Features

One QHeaderView for multiple view

Scheduled Pinned Locked Moved Unsolved General and Desktop
qheaderviewqtableview
2 Posts 2 Posters 423 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.
  • D Offline
    D Offline
    dridk2
    wrote on 5 Aug 2020, 11:41 last edited by dridk2 8 May 2020, 11:42
    #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
    • C Offline
      C Offline
      Chris Kawa
      Lifetime Qt Champion
      wrote on 5 Aug 2020, 11:49 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

      1/2

      5 Aug 2020, 11:41

      • Login

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