Hello Simon, I'm afraid it's me again.
I'm now having trouble with KConfig/KConfigGroup: when I retrieve the
application config object, and try to write to it, it crashes. See the
attached two files. Can you reproduce that?
BTW, will this new templatized way of KConfig work just as fine from
Python?
Thanks,
--
Adeodato Simó dato at net.com.org.es
Debian Developer adeodato at debian.org
Listening to: Kiko Veneno - Currito ta ta ta
#! /usr/bin/env python
"""Using KConfig crashes the application."""
import sys
from PyKDE4 import kdeui, kdecore
class MainWindow(kdeui.KMainWindow):
def __init__ (self, *args):
kdeui.KMainWindow.__init__(self, *args)
kdecore.KGlobal.config().group('Foo').writeEntry('a', 'b')
print '=== syncing now ===' # not reached
kdecore.KGlobal.config().sync()
def main():
kdecore.KCmdLineArgs.init(sys.argv, 'test', '', kdecore.ki18n('test'), '1.0')
application = kdeui.KApplication()
main_window = MainWindow()
main_window.show()
application.exec_()
if __name__ == '__main__':
main()
#include <kglobal.h>
#include <kmainwindow.h>
#include <kapplication.h>
#include <kcmdlineargs.h>
#include <kconfiggroup.h>
class MainWindow : public KMainWindow
{
public:
MainWindow() {
KGlobal::config()->group("Foo").writeEntry("a", "b");
KGlobal::config()->sync();
}
~MainWindow() {}
};
int main(int argc, char *argv[])
{
KCmdLineArgs::init(argc, argv, "test", 0, ki18n("test"), "1.0");
KApplication app;
MainWindow mw;
mw.show();
app.exec();
}
_______________________________________________
PyQt mailing list [email protected]
http://www.riverbankcomputing.com/mailman/listinfo/pyqt