Results 1 to 14 of 14

Thread: Advanced QTableView

Hybrid View

Previous Post Previous Post   Next Post Next Post
  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 Re: Advanced QTableView

    Quote Originally Posted by wysota View Post
    Well said - a widget, but not as a view. The view API is not part of the public API of the widget, so you can't make simple signal-slot connections or use the widget as a custom widget in Designer without messing around with its internals.
    As written above, the widget will not have the API of a view, so the final developer will only have access to its QWidget API from the Designer (unless you forward all the view functionality to the widget's public API practically reimplementing the view architecture, as I mentioned in the previous post).
    QHeaderView::sectionResized() is an obvious candidate...
    What are then the alternatives to implement a footer row?

  2. #2
    Join Date
    Feb 2010
    Location
    Sydney, Australia
    Posts
    111
    Thanks
    18
    Thanked 5 Times in 5 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Advanced QTableView

    HierarchicalHeaderView 1.3.2 might be worth a look. I haven't used it or looked a the code though - just came across it and remembered this post.

  3. #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: Advanced QTableView

    Quote Originally Posted by stefanadelbert View Post
    HierarchicalHeaderView 1.3.2 might be worth a look. I haven't used it or looked a the code though - just came across it and remembered this post.
    I checked it and as far as I can see it does not cover how to implement a footer line.

  4. #4
    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: Advanced QTableView

    You have to place the footer manually in the view. QAbstractScrollArea::setViewportMargins() can be helpful with doing that.

  5. #5
    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: Advanced QTableView

    Quote Originally Posted by wysota View Post
    You have to place the footer manually in the view. QAbstractScrollArea::setViewportMargins() can be helpful with doing that.
    Is there any code example available on how to do this?

  6. #6
    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: Advanced QTableView

    Quote Originally Posted by doberkofler View Post
    Is there any code example available on how to do this?
    I'll try to come up with an example later today.

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

    doberkofler (19th April 2010)

Similar Threads

  1. Set height of QTableView to fit exact number of rows.
    By Ben.Hines in forum Qt Programming
    Replies: 3
    Last Post: 17th January 2019, 01:49
  2. QTableView sorting
    By gabriels in forum Qt Programming
    Replies: 11
    Last Post: 6th October 2010, 17:13
  3. QTableView currentChanged <> selecting header
    By Everall in forum Qt Programming
    Replies: 4
    Last Post: 1st April 2009, 08:24
  4. QTableView paints too much
    By Jimmy2775 in forum Qt Programming
    Replies: 2
    Last Post: 26th July 2006, 18:42
  5. Multi-line messages in QTableView
    By Conel in forum Qt Programming
    Replies: 6
    Last Post: 13th April 2006, 13:49

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.