[Konsole-devel] problem embedding Konsole part in PyKDE4 app

Robert Knight robertknight at gmail.com
Tue Sep 22 09:00:31 UTC 2009


> But in KDE 4.3 this has stopped working (after the call to openUrl() the
> widget is not painted anymore and there are X Errors on the starting
> terminal).

Which errors specifically?  openUrl() should do what it says on the
tin - if not, that
is a regression which needs to be fixed.  A C++ test case would be
helpful if possible.

Regards,
Robert.

2009/9/22 Wilbert Berendsen <wbsoft at xs4all.nl>:
> Hi Simon (PyKDE4) and Robert (Konsole),
>
> I have a question regarding embedding libkonsolepart in a PyKDE4 application
> (just like the embedded terminal in e.g. Kate).
>
> I'm developing Frescobaldi (www.frescobaldi.org), a text editor for LilyPond
> (music) text files. It is similar to Kile (Latex editor), but written in
> Python using PyKDE4.
>
> I embed a konsolepart in my Python app like this:
> (mainwin is my KMainWindow)
>
> factory = KPluginLoader("libkonsolepart").factory()
> if factory:
>    part = factory.create(mainwin)
>    widget = part.widget()
>
> This shows a terminal window with just a cursor in the upper left corner. So
> far so good, but now I want Konsole to open a shell in a directory.
> In KDE 4.1 and 4.2 this works:
>
> part.openUrl(KUrl("file:///home/wilbert/"))
>
> But in KDE 4.3 this has stopped working (after the call to openUrl() the
> widget is not painted anymore and there are X Errors on the starting
> terminal).
>
> It seems other terminal embedding apps (like Kate) now use the
> TerminalInterface with the openShellInDir() method.
>
> But how can I use the TerminalInterface on a konsole part from inside PyKDE4?
> If this isn't possible, it would be nice if openUrl() could just work on the
> konsole part (like in KDE 4.2 and 4.1).
>
> With many thanks for both Konsole and the incredible PyKDE4!
> With many regards,
> Wilbert Berendsen
>
> --
> http://www.wilbertberendsen.nl/
> "You must be the change you wish to see in the world."
>        -- Mahatma Gandhi
>



More information about the konsole-devel mailing list