Results 1 to 18 of 18

Thread: QTableView with a checkbox

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #14
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts

    Default Re: QTableView with a checkbox

    Allocate the delegate object on the heap so it won't get destroyed as soon as it gets out of scope:
    Qt Code:
    1. checkboxDelegate* delegate = new checkboxDelegate(this);
    2. ui.tableTV->setItemDelegate(delegate);
    To copy to clipboard, switch view to plain text mode 

    Edit: oops, forgot the important keyword new
    Last edited by jpn; 1st November 2006 at 20:18.
    J-P Nurmi

Similar Threads

  1. QTableView sorting
    By gabriels in forum Qt Programming
    Replies: 11
    Last Post: 6th October 2010, 18:13
  2. checkbox
    By nErnie in forum Qt Programming
    Replies: 1
    Last Post: 25th September 2006, 22:59
  3. CheckBox and selection in QTableView
    By Mike Krus in forum Qt Programming
    Replies: 1
    Last Post: 21st September 2006, 21:31
  4. QTableView paints too much
    By Jimmy2775 in forum Qt Programming
    Replies: 2
    Last Post: 26th July 2006, 19:42
  5. Multi-line messages in QTableView
    By Conel in forum Qt Programming
    Replies: 6
    Last Post: 13th April 2006, 14: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.