Results 1 to 3 of 3

Thread: Make first column freezed in QTableView

  1. #1
    Join Date
    Oct 2009
    Posts
    28
    Thanks
    4
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Make first column freezed in QTableView

    Hello again.
    I would like to freeze the first (or firsts) columns from a QTableView, in such a way that when you move the horizontal bar of the QTableView, the first column stay fixed.

    Is it possible?.

    Thanks again.

  2. #2
    Join Date
    Jun 2007
    Location
    India
    Posts
    1,042
    Thanks
    8
    Thanked 133 Times in 128 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Make first column freezed in QTableView

    i dont think there is a direct way, but u can always use a headerview with custom delegate to look like all the other cells, or may be put a custom widget in 0 spacing with the table view.

  3. #3
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: Make first column freezed in QTableView

    Look at the Frozen Column example in the documentation. The approach can be extended to freeze more than one column.

Similar Threads

  1. Make a column read-only in a QSqlTableModel/QTableView
    By graciano in forum Qt Programming
    Replies: 0
    Last Post: 15th November 2009, 19:18
  2. QTreeView: make root decoration appear on visual column 0
    By chezifresh in forum Qt Programming
    Replies: 1
    Last Post: 22nd November 2008, 03:36
  3. make QTableView work as a multi-column list view
    By wesley in forum Qt Programming
    Replies: 1
    Last Post: 11th March 2008, 15:43
  4. Currently sorted column in QTableView
    By borges in forum Newbie
    Replies: 1
    Last Post: 21st September 2007, 17:52
  5. Replies: 8
    Last Post: 28th May 2007, 21:32

Tags for this Thread

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.