Help to display custom settings dialog in plasma widget (Python)

Aaron J. Seigo aseigo at kde.org
Fri Aug 30 17:48:38 UTC 2013


On Wednesday, August 21, 2013 17:17:18 bug seagull wrote:
> I am creating a plasma widget that displays certain elements of an rss feed
> . It requires a string from the user in order to set the widget up. To get
> this input I made a dialog using qt designer and converted it to python
> code and imported it. I am unable to get this dialog to show up however
> when I click the widget settings.

you mean replace the standard settings dialog with your KInputDialog? if so, 
that is purposefully not possible. otherwise every single applet would have 
their own funky way of configuring and there would be zero opportunity to 
manage configuration for different target form factors centrally.

if you mean that you want to allow the user to bring up a dialog by clicking 
on some area (e.g. a pushbutton) on your widget, this is *highly* discouraged. 
dialogs may not be suitable for the platform in question, for instance.

what you can do, much more cleanly, is add your configuration UI to the 
standard config dialog and then if the setting is not made, call 
setConfigurationRequired(true)  (or the equivalent in Python)

-- 
Aaron J. Seigo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20130830/25a6d351/attachment.sig>


More information about the Plasma-devel mailing list