Results 1 to 2 of 2

Thread: QTableView with fixed header

  1. #1
    Join Date
    May 2008
    Posts
    8
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default QTableView with fixed header

    Hi,
    I want to create a scrollable table with Qt4 where the header stays always visible while scrolling the table.
    Is this possible without creating two tables (one unscrollable for the header and one scrollable for the data) and connection both of them?
    I hoped to find a property "headerAlwaysVisible()" or something similar... but it seems I expected too much

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,018 Times in 4,794 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QTableView with fixed header

    I understand that by the header you mean not the header itself but some number of actual items of the table that are to be always visible while others remain scrollable? Something like "freeze" functionality of spreadsheets? If so, then this is not directly supported by Qt - you have to "join" two table views to have that (they can use the same model).

Similar Threads

  1. QTableView currentChanged <> selecting header
    By Everall in forum Qt Programming
    Replies: 4
    Last Post: 1st April 2009, 08:24
  2. QTreeView Fixed column & QTableView
    By jpujolf in forum Qt Programming
    Replies: 4
    Last Post: 13th August 2008, 09:35
  3. QTableView header dragging
    By cmaxb in forum Qt Programming
    Replies: 1
    Last Post: 9th December 2006, 12:11
  4. QTableView header in corner
    By danstr in forum Qt Programming
    Replies: 3
    Last Post: 18th May 2006, 20:16
  5. QTableView: disable row header
    By mattie in forum Qt Programming
    Replies: 6
    Last Post: 8th March 2006, 12:16

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.