problem with custom XMLGUI usage

Dirk Schönberger dirk.schoenberger at sz-online.de
Tue Jan 6 21:35:55 GMT 2004


Hi,

I would like to use the XMLGUI framework to describe popup dialogs for my
application in the application's .rc file.
The idea is to define some specific dialog options, so that the
functionality of the dialog can be described at compile time, while the
actual dialog
layout can be changed at runtime.
I don't really want to use Qt designer, because I don't like its generative
approach. In theory I could load .ui files at runtime, but I don't think
these files are particularly
intended to be changed dynamically.

Attached is an .rc file which contains my idea of a dialog description in an
rc file.

I have started to implement the necessary XMLGUIDialog class, but I run into
some starting problems.
If I call the method setup GUI of the attached class, my application crashes
in KXMLGUIFactory::container / KXMLGUIFactoryPrivate::pushState.
The appropriate factory() methods are called and the expected debug messages
are emitted.

Do I miss some needed initialization of the used classes, or do I have to
override more methods?

The dialog is initialized with XMLGUIDialog (win, win), where win is an
KMainWindow*. The idea is that my dialog is a child KXMLGUIClient of the
main window.
I would like to use the rc file of my application and its main window, but
still a dialog local actionCollection()

Any help?

Regards
Dirk

-------------- next part --------------
A non-text attachment was scrubbed...
Name: kimageworkshopui.rc
Type: application/octet-stream
Size: 1620 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20040106/f3797fe6/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: xmlguidialog.cpp
Type: application/octet-stream
Size: 5452 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20040106/f3797fe6/attachment-0001.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: xmlguidialog.h
Type: application/octet-stream
Size: 2353 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20040106/f3797fe6/attachment-0002.obj>


More information about the kde-core-devel mailing list