KSelectAction

Albert Astals Cid aacid at kde.org
Tue Jul 18 21:09:14 BST 2006


A Dimarts 18 Juliol 2006 15:45, Clarence Dang va escriure:
> 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.

I was working on trying to solve it but as i have quite few time feel free to 
finish it. This is what i have, it solves some problems we have on okular but 
still the shown combobox entry is always the first.

Albert

>
> Thanks,
> Clarence
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kselectaction.diff
Type: text/x-diff
Size: 1455 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20060718/9b38cd3d/attachment.diff>


More information about the kde-core-devel mailing list