Results 1 to 4 of 4

Thread: Functionality of QTableView

  1. #1
    Join Date
    Oct 2009
    Location
    Vienna, Austria
    Posts
    57
    Thanks
    24
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default Functionality of QTableView

    I'm currently evaluating the functionality of the QTableView widget and somehow miss the following functionality:
    1) Multiple fixed columns (often used when showing a structured primary key for each row)
    2) Fixed (last) row (often used when showing totals, counts, etc. in the last row)
    3) Rearranging columns using drag and drop
    4) Automatically size row/column width for individual or multiple columns
    5) Column and row headers with mutiline text

    I was wondering if I just missed this functionality when looking at the documentation or if this is really not supported. If not, I would be interested in understanding how the above mentioned functionality might e best implemented and if there are 3rd party widgets out there that might offer this functionality.

    Thank you!

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

    Default Re: Functionality of QTableView

    Quote Originally Posted by doberkofler View Post
    I'm currently evaluating the functionality of the QTableView widget and somehow miss the following functionality:
    1) Multiple fixed columns (often used when showing a structured primary key for each row)
    If you mean multiple line headers, this has been implemented. Look at qt-apps.

    If you mean frozen rows or frozen columns, you have to implement it yourself by placing another table between the header of the main table and its contents. QAbstractScrollArea::setViewportMargins() will help you do that.

    2) Fixed (last) row (often used when showing totals, counts, etc. in the last row)
    Same as above.
    3) Rearranging columns using drag and drop
    QHeaderView::setMovable()
    4) Automatically size row/column width for individual or multiple columns
    QHeaderView::setResizeMode()
    5) Column and row headers with mutiline text
    You need to reimplement QHeaderView::paintSection() (and possibly QHeaderView::sectionSizeFromContents()) for that.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. The following user says thank you to wysota for this useful post:

    doberkofler (22nd March 2010)

  4. #3
    Join Date
    Oct 2009
    Location
    Vienna, Austria
    Posts
    57
    Thanks
    24
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default Re: Functionality of QTableView

    wysota: Thank you for the your feedback and sorry for my late reply!

    It seems as if sorting by multiple columns is also not supported by QTableView and I'm now looking for existing implementations of what I need.
    Would you now of any documentation, examples, code snippets, free or commercial implementation providing a QTableView like functionality enhanced by:
    1) Frozen (first) columns (often used when showing a structured primary key for each row)
    2) Frozen (last) row (often used when showing totals, counts, etc. in the last row)
    3) Column and row headers with mutiline text
    4) Ability to sort by mutiple columns

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

    Default Re: Functionality of QTableView

    You can try QICSTable provided by ICS. I don't know if it has all the features you want but it's worth to take a look.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. Replies: 26
    Last Post: 7th January 2016, 20:26
  2. QTableView empty space or too little space.
    By davemar in forum Qt Programming
    Replies: 2
    Last Post: 16th October 2009, 16:00
  3. One Model, Two Views (QTreeView and QTableView)
    By dgarrett97 in forum Newbie
    Replies: 2
    Last Post: 14th September 2009, 18:10
  4. Replies: 2
    Last Post: 7th June 2009, 10:47
  5. Multi-line messages in QTableView
    By Conel in forum Qt Programming
    Replies: 6
    Last Post: 13th April 2006, 13:49

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.