How to make the item checked while i click the item in a QListWidget?
-
Hi.
Asked already ,,
"here":http://qt-project.org/forums/viewthread/9914 -
i set ItemIsUserCheckable, but still can't get the effect i want.
i now setCheckState(Qt::Unchecked) to make the ListItem having a checkbox in font of the icon and text.
i just want to make the item checked/unchecked no matter where i click on the item, not i have to click the checkbox there, but i want the check state to change even when i click on the text and icon (whick mean when i select the item, i want it checked/unchecked) -
Hi,
That you'll have to do by hand using e.g. the itemClicked signal
-
thank you :)
and how to do this?
i want to make 1 item checked all the time,
i now tried a most common way: in clickedItem slot, if i checked the current item, first of it , i make all the checked items unchecked....
but i found there is no fast way to do this, eg. there is no API to get all the items or the row number -
Can you described exactly what you are trying to achieve with that selection ?
-
Only one item selected is easy to do, just enforce using SingleSelection. However that doesn't explain why the checkbook