Results 1 to 3 of 3

Thread: QTableView versus QTableWidget

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #3
    Join Date
    Jan 2006
    Location
    Cambridge, MA
    Posts
    32
    Thanked 7 Times in 6 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: QTableView versus QTableWidget

    You definatly want the Model-View classes. You will implement the following:

    QAbstractItemModel which will interface with your own data structures. This will contain only data. If you need only lightweight data then the QStandarditemModel might just work. That has internal data stuctures to hold data.

    QAbstractItemDelegate. This is where you can define drawing and editing for each cell

    The above is analagous to the old TableItem where data, drawing and editing were stuffed into one class.

    You will use
    QTableView
    QItemSelectionModel for handle selections.

    --Justin

  2. The following user says thank you to Glitch for this useful post:

    jcr (24th May 2006)

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. Multi-line messages in QTableView
    By Conel in forum Qt Programming
    Replies: 6
    Last Post: 13th April 2006, 13:49
  4. Replies: 6
    Last Post: 5th March 2006, 21:05
  5. How to obtain the width of a QTableWidget?
    By Giel Peters in forum Qt Programming
    Replies: 3
    Last Post: 9th January 2006, 22:34

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.