KSelectAction
Clarence Dang
dang at kde.org
Tue Jul 18 14:45:41 BST 2006
Does KSelectAction work for anyone? I'm trying to get the KolourPaint zoom
action working.
I see 3 problems with KSelectAction:
1. While selecting one of the items in the menu representation initially emits
"triggered(int)" and "currentItem()" reports the right value, after
re-entering the event loop, the item is magically deselected.
2. The combobox representation is not synchronised with the action at all.
QComboBox does not support QAction natively so some signals need to be
connected.
3. currentText() returns "&MyString" (i.e. it adds the accelerator) instead of
"MyString" (where "MyString" is passed to setItems()). This is unexpected
and a subtle change from KDE 3.
If you want to see what I mean, compile trunk/KDE/kdegraphics/kolourpaint with
the attached patch (which just adds some debugging and bypasses problem 3.).
Then, try the "View / Zoom" submenu and the corresponding combobox in the
toolbar.
If no one replies, I'm going to start hacking on KSelectAction.
Thanks,
Clarence
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kolourpaint-zoom-draft.diff
Type: text/x-diff
Size: 4883 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20060718/280aeb57/attachment.diff>
More information about the kde-core-devel
mailing list