introducing a new (sub)menu and getting it to appear

René J.V. Bertin rjvbertin at gmail.com
Sun May 29 21:29:46 UTC 2016


Hi,

I'm trying to wrap up a new submenu in KDevelop's Settings menu, i.e. a menu item that opens another menu that has a number of items that's determined when the application starts. I'm adding the code (taken from Kdenlive) in MainWindowPrivate::MainWindowPrivate, following the example of the existing code. I'm doing a `ac->addAction(QStringLiteral("widgetstyle_submenu"), stylesAction);` when `stylesAction` is complete, and have added a matching `<Action name="widgetstyle_submenu"/>` in kdevelopui.rc (and touched kdevelop.qrc for good measure).
The menu item doesn't show up though. I've rebuilt in and reinstalled from both kdevplatform/build/sublime and kdevelop/build/app . Is there anything else I should do?

As to the underlying reason: this is related to the bug report about the use of the QTabBar widget on OS X, which I filed a day or two ago. I've since learned that Kate's alternative tabbar widget isn't really intended to be reused (and does indeed have quite different behaviour than the one in KDevelop). I've tried using `QTabBar::setDocumentMode()` which is intended to make the widget more appropriate for use in tabbed document views, but that doesn't really improve anything. So I'm looking at an alternative solution, more of a workaround: give users the opportunity to use on of the other widget styles available on their system, like Kdenlive does (they should at least have Fusion, which is a good "common denominator" style that works well on all platforms).

R.


More information about the KDevelop-devel mailing list