KMenu title is navigable with the keyboard

Fredrik Höglund fredrik at kde.org
Tue Nov 17 23:03:20 GMT 2009


On Tuesday 17 November 2009, Christoph Feck wrote:
> On Tuesday 17 November 2009 23:00:03 Albert Astals Cid wrote:
> > When doing addTitle over a KMenu one gets a entry in the popup menu that is
> >  a title and so can't be clicked over and does not react to mouse clicks,
> >  but it can be "focused" with up/down keys and "activated" with Enter
> >  (popup closes)
> > 
> > Is this on purpose or a bug?
> 
> Bug 169059.

QMenu supports titles in Qt 4, but it hides it well.

What you do is call QMenu::addSeparator(), and set the text and icon
properties in the returned action.

The widget style will then draw the separator as a title.

Note that Oxygen doesn't implement this feature, so if you want to try
this you'll have to test it with Plastique.

Regards,
Fredrik





More information about the kde-core-devel mailing list