Results 1 to 6 of 6

Thread: Need help on check uncheck checkbox on QlistwidgetItem

  1. #1
    Join Date
    Sep 2007
    Posts
    16
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Need help on check uncheck checkbox on QlistwidgetItem

    I have problem clicking on the checkbox of QlistwidgetItem in Qlistwidget. It is really hard to click on the box even when I try to click at the middle of box. How I can make it is easier to check or make the box bigger, change the font size in Qlistwidget didn't help much.

  2. #2
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    258
    Thanks
    22
    Thanked 19 Times in 16 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: Need help on check uncheck checkbox on QlistwidgetItem

    do you mean making the whole QListWidgetItem larger or just the checkbox? setting the sizeHint may help you in the first case. You can also resort to drawing the items yourself in order to have full control by using a custom delegate but that involves a little more labour.

    http://doc.trolltech.com/4.3/qitemdelegate.html
    http://doc.trolltech.com/4.3/qlistwi...ml#setSizeHint

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

    Default Re: Need help on check uncheck checkbox on QlistwidgetItem

    Which exact version of Qt are you using? There has been a relevant bug in some recent versions of Qt...
    J-P Nurmi

  4. #4
    Join Date
    Sep 2007
    Posts
    16
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Need help on check uncheck checkbox on QlistwidgetItem

    Quote Originally Posted by momesana View Post
    do you mean making the whole QListWidgetItem larger or just the checkbox? setting the sizeHint may help you in the first case. You can also resort to drawing the items yourself in order to have full control by using a custom delegate but that involves a little more labour.

    http://doc.trolltech.com/4.3/qitemdelegate.html
    http://doc.trolltech.com/4.3/qlistwi...ml#setSizeHint
    I just need to make the checkbox larger, the sizeHint didn't work, the checkbox is still the same size with bigger sizeHint, it just add more space in between each items.

    Quote Originally Posted by jpn View Post
    Which exact version of Qt are you using? There has been a relevant bug in some recent versions of Qt...
    I use QT 4.3.2

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

    Default Re: Need help on check uncheck checkbox on QlistwidgetItem

    Quote Originally Posted by tho97 View Post
    I use QT 4.3.2
    A couple of bug fix release have come out since that version. I'd try Qt 4.3.4.

    From 4.3.3 changes:
    - QItemDelegate
    * [181221] Fixed problem with the rectangle that was used to check the mouse coordinates when clicking on the check box.
    J-P Nurmi

  6. #6
    Join Date
    Sep 2007
    Posts
    16
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Need help on check uncheck checkbox on QlistwidgetItem

    thank jpn, version 4.3.4 fixed the problem, now I can check and uncheck the checkbox.

Similar Threads

  1. Replies: 3
    Last Post: 1st April 2011, 04:58
  2. Checkboxes: check and uncheck
    By 3nc31 in forum Qt Programming
    Replies: 2
    Last Post: 5th June 2008, 21:26
  3. Check Box problem
    By Seema Rao in forum Qt Programming
    Replies: 6
    Last Post: 30th November 2007, 19:32
  4. Check and Uncheck on a Dir Tree?
    By vishal.chauhan in forum Qt Programming
    Replies: 2
    Last Post: 3rd July 2007, 11:55

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.