[PyKDE] Using custom components and Qt Designer
withQWidgetFactory in PyQt
ralsina at kde.org
Wed Nov 3 18:31:33 GMT 2004
>> Is there a way to use Qt Designer to embed python-created components
>> into dialogs etc. when they are loaded with QWidgetFactory inty our
>> python application?
> For the occasional custom widget on a pyuic form we either insert an empty
> QFrame and manually create the widget inside it, or insert a QLabel
> placeholder that gets manually replaced. All stoneage stuff I guess....
The problem with doing it that way is that you can't connect the signals
using designer, and have to do it by hand in you code. Which is kinda
Sure, you can define the signals and slots in Designer, but then it
doesn't really generate the right code (I mentioned that in my tutorial
I think the main thing needed to be able to use custom python widgets in
designer "the right way" would be a way to create a widget plugin.
Check Qt designer's manual, chapter 7 "Creating Custom Widgets with
Plugins" to see what I mean.
The bad news is that I am not sure how that could be done for python
widgets. The good news are there's a lot of smart people on this list ;-)
("\''/").__..-''"`-. . Roberto Alsina
`9_ 9 ) `-. ( ).`-._.`) ralsina at kde.org
(_Y_.)' ._ ) `._`. " -.-' KDE Developer (MFCH)
(l)-'' ((i).' ((!.' Buenos Aires - Argentina
Imminentizing the eschaton since 1971.
More information about the PyQt