Registered Member
|
How does setFlags work for Ruby?
I can't get the following working:
|
Administrator
|
Can you please provide the error message you are encountering?
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
Registered Member
|
Well, there is no error message.
The item just greys out (becomes unselectable). |
Administrator
|
What happens if you just pass Qt::ItemIsSelectable? I suspect the | may be triggering an or operation, instead of combining the two enumerators as it would in C++.
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
Registered Member
|
Nope. That doesn't do it either. But I tried something different and well...
Okay thats good to know. So I tried...
And the item is editable! Looking at this table:
53 is a combination of 1, 4, 16 and 32 with 2 (Qt::ItemIsEditable) missing. Meaning that setting the flag to 55 it would include 2 as well and thus enabling the Qt::ItemIsEditable flag! Though 54 already enables editing, so I'm not so sure about my explanation, but that makes the most sense to me. |
Administrator
|
Good to see you found a solution, although ideally one should have been able to use the enumerators Qt provides.
I suspect 54 means Qt::ItemIsEditable (2), Qt::ItemIsDragEnabled (4), Qt::ItemIsUserCheckable (16) and Qt::ItemIsEnabled (32).
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
Registered users: Bing [Bot], Evergrowing, Google [Bot], rockscient