Results 1 to 2 of 2

Thread: Strange behaviour by item with Qt::ItemIsUserCheckable

  1. #1
    Join Date
    Feb 2011
    Location
    Bangalore
    Posts
    207
    Thanks
    20
    Thanked 28 Times in 27 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Strange behaviour by item with Qt::ItemIsUserCheckable

    Idea is to provide user checkable items in qtableview. I am subclassing from QAbstractTableModel, providing Qt::ItemIsUserCheckable for the appropriate columns in flags function.
    In the data() function , I provide Qt::Checked/Qt::Unchecked in Qt::CheckStateRole.
    In the setData() function, for the role Qt::CheckStateRole i set data as per the value given.

    The behavior is very erratic. Edittriggers even if set to none, editing is possible on single click for checkboxes. And while checking/unchecking them, they toggle twice!! This behavior happens sometimes but occasionally enough to be noticeable. Is there a known bug in this regard?

  2. #2
    Join Date
    Feb 2011
    Location
    Bangalore
    Posts
    207
    Thanks
    20
    Thanked 28 Times in 27 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Strange behaviour by item with Qt::ItemIsUserCheckable

    There was a bug and it was introduced by me. Qt is alright . I am laughing at myself now for jumping the gun and pointing to qt for possible bug

Similar Threads

  1. Strange behaviour in QGraphicsScene
    By yagabey in forum Qt Programming
    Replies: 1
    Last Post: 20th July 2011, 03:01
  2. Need help: Strange behaviour
    By navi1084 in forum Qt Programming
    Replies: 3
    Last Post: 14th November 2008, 05:03
  3. Strange behaviour of QPainter...
    By oscar in forum Qt Programming
    Replies: 2
    Last Post: 8th November 2008, 13:07
  4. very strange behaviour
    By regix in forum Qt Programming
    Replies: 23
    Last Post: 20th July 2006, 18:38
  5. [Qt 4.1] Strange behaviour with QTableView
    By fane in forum Qt Programming
    Replies: 1
    Last Post: 23rd January 2006, 07:17

Tags for this Thread

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.