From pykde Wed Nov 03 17:58:35 2004 From: "Roberto Alsina" Date: Wed, 03 Nov 2004 17:58:35 +0000 To: pykde Subject: Re: [PyKDE] Using custom components and Qt Designer Message-Id: <3958.192.168.1.253.1099506693.squirrel () linux ! netline ! com ! ar> X-MARC-Message: https://marc.info/?l=pykde&m=109950471506109 >> 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 stone-agey ;-) 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 someplace). 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@kde.org (_Y_.)' ._ ) `._`. " -.-' KDE Developer (MFCH) _..`-'_..-_/ /-'_.' (l)-'' ((i).' ((!.' Buenos Aires - Argentina Imminentizing the eschaton since 1971. _______________________________________________ PyKDE mailing list PyKDE@mats.imk.fraunhofer.de http://mats.imk.fraunhofer.de/mailman/listinfo/pykde