KXMLGUI - User definable toolbars and actions

Andreas Pakulat apaku at gmx.de
Mon Jun 14 15:55:24 BST 2010

On 14.06.10 16:15:54, Milian Wolff wrote:
> I intend to port the Quanta3 feature for user definable toolbars properly to 
> KDE4 and thought that this should actually be a KDELibs core feature.
> Would there be anything against adding a "new toolbar" feature to the 
> 'ConfigureToolbars' dialog? There _all_ available actions of the 
> KActionCollection should be listed, contrary to the toolbars defined by the 
> application's UI.rc files.
> Is there anything from the KXMLGUI standpoint that would speak against it? 
> David Faure, I get that you are the one who knows the most about it?
> We want such a feature to make it possible for users to have custom actions 
> (e.g. to insert snippets, execute scripts, ...) in toolbars.
> Actually the latter is also a part that I don't quite understand on how to 
> implement properly using KXMLGUI. To my current understanding, I need to 
> register all available actions to KXMLGUI with the ui.rc file beforehand, i.e. 
> I cannot do that at runtime. Is that correct? Could that be changed?
> In KDevelop we already have at least one point where we don't use KXMLGUI but 
> plain KShortcutWidget & KConfig to assign shortcuts to toolviews (there can be 
> an arbitrary amount of those).

How did Quanta do this in KDE3? I mean xmlgui isn't a KDE4 feature, its
been in there in KDE3 times as well and there's not been that many changes

IMHO xmlgui is simply not the right tool for this job (but maybe I'm
underestimating it?), its been designed to setup a static menu/toolbar
layout and eventually let the user add/remove actions and configure
shortcuts for them. Creating new actions on-the-fly or toolbars and
managing this wasn't planned I think.


In the stairway of life, you'd best take the elevator.

More information about the kde-core-devel mailing list