Results 1 to 3 of 3

Thread: CheckBox inside a QTableView

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Frankfurt
    Posts
    500
    Platforms
    MacOS X Unix/X11
    Thanks
    1
    Thanked 52 Times in 52 Posts

    Default Re: CheckBox inside a QTableView

    You have to use custom delegate.
    It's nice to be important but it's more important to be nice.

  2. #2
    Join Date
    Mar 2010
    Posts
    1
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: CheckBox inside a QTableView

    Quote Originally Posted by axeljaeger View Post
    You have to use custom delegate.
    Hi,

    I have tried using custom delegates and it works fine.

    But i have another problem. If sorting is enabled in QTableView and i change the sort order then the delegate disappears i.e. it is not used after the model is sorted.

    Can some one suggest a way to enable sorting while using custom delegates.

    Another approach which i will be trying is to use the QHeaderView signal to indicate that sorting order has been changed and then call QTableView::sortByColumn


    thanks,

    Anuj

Similar Threads

  1. Replies: 1
    Last Post: 9th August 2009, 16:27
  2. Replies: 1
    Last Post: 6th July 2009, 02:53
  3. Replies: 2
    Last Post: 5th June 2008, 22:32
  4. QTableView with a checkbox
    By maxpower in forum Qt Programming
    Replies: 17
    Last Post: 18th February 2007, 10:45
  5. CheckBox and selection in QTableView
    By Mike Krus in forum Qt Programming
    Replies: 1
    Last Post: 21st September 2006, 21:31

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.