Results 1 to 4 of 4

Thread: Multiple ListViews and checkbox problem

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Mar 2008
    Posts
    141
    Thanks
    10
    Thanked 9 Times in 9 Posts

    Default Re: Multiple ListViews and checkbox problem

    Hi,

    maybe you can just return QVariant() for CheckStateRole/DecorationRole in the data() function of your model if you dont want to show the checkboxes. ... just a guess. Dont know if it works.

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

    onamatic (8th January 2009)

  3. #2
    Join Date
    Nov 2008
    Posts
    33
    Thanks
    5
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Multiple ListViews and checkbox problem

    Quote Originally Posted by janus
    maybe you can just return QVariant() for CheckStateRole/DecorationRole.
    Hi janus,

    Many thanks for the suggestion; unfortunately those flags only affect whether a checkbox is checked and what to render as an icon respectively. Neither affect whether a checkbox is drawn or not.

  4. #3
    Join Date
    Nov 2008
    Posts
    33
    Thanks
    5
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Multiple ListViews and checkbox problem

    Quote Originally Posted by onamatic View Post
    Hi janus,

    Many thanks for the suggestion; unfortunately those flags only affect whether a checkbox is checked and what to render as an icon respectively. Neither affect whether a checkbox is drawn or not.
    My apologies janus for my hasty reply. Your suggestion to return QVariant() for CheckStateRole was spot on the money. (Other bits of code conspired to make it seem as if it weren't working when I tried it yesterday.) Thank you.

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.