Results 1 to 14 of 14

Thread: QTableView, no selection rectangle

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #12
    Join Date
    Aug 2008
    Location
    Ukraine, Krivoy Rog
    Posts
    1,963
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows
    Thanked 370 Times in 336 Posts

    Default Re: QTableView, no selection rectangle

    example
    Qt Code:
    1. class MyDelegate: public QItemDelegate
    2. {
    3. Q_OBJECT
    4. public:
    5. virtual void drawFocus ( QPainter * /*painter*/, const QStyleOptionViewItem & /*option*/, const QRect & /*rect*/ ) const {}
    6. };
    7. ...
    8. QTableWidget *table = new QTableWidget(10, 10);
    9. table->setItemDelegate(new MyDelegate());
    10. for (int row = 0; row < 10; ++row) {
    11. for (int col = 0; col < 10; ++col) {
    12. table->setItem(row, col, item);
    13. }
    14. }
    15. ...
    To copy to clipboard, switch view to plain text mode 
    Qt Assistant -- rocks!
    please, use tags [CODE] & [/CODE].

  2. The following 4 users say thank you to spirit for this useful post:

    alisami (25th December 2008), Brecht (7th March 2013), giantdragon (21st June 2011), matthieu (30th May 2012)

Similar Threads

  1. QSqlTableModel and QTableView selection problems
    By innerhippy in forum Qt Programming
    Replies: 5
    Last Post: 19th December 2008, 05:48
  2. QTableView selection problem
    By aiprober in forum Qt Programming
    Replies: 12
    Last Post: 9th June 2008, 11:55
  3. QTableView Row Selection
    By ToddAtWSU in forum Qt Programming
    Replies: 8
    Last Post: 12th December 2007, 21:27
  4. CheckBox and selection in QTableView
    By Mike Krus in forum Qt Programming
    Replies: 1
    Last Post: 21st September 2006, 20:31
  5. How to paint a selection rectangle on a pixmap?
    By SkripT in forum Qt Programming
    Replies: 6
    Last Post: 8th January 2006, 19:52

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.