Åke,

There used to be a QtDesigner plugin for PySide, but I don't think it ever
worked.  Fortunately, you can still use Designer even without the plugin by
using the "promotion" system.  Say, for example, you've created MyLineEdit,
a QLineEdit subclass.

   1. In Designer, drop a QLineEdit on the form where you'd like your
   MyLineEdit to go
   2. Right click on the QLineEdit widget you added to the form and select
   "Promote to...".
   3. In "Promoted class name:", enter MyLineEdit.
   4. In "Header file", enter package/path/to/MyLineEdit.h, where
   package/path/to is the Python package path to the .py file that contains
   the MyLineEdit widget class.  pyside-uic converts this into "from
   package.path.to import MyLineEdit"
   5. Click "Add"
   6. Click "Promote"

The next time you add a QLineEdit to the form, you can use the promotion
you've already defined, so you don't have to go through these steps for
each widget.  The downside to this approach is that you don't have access
to the widget's custom properties like you would through a plugin.

Good luck!

Nathan

On Wed, Dec 21, 2011 at 4:46 AM, Åke Kullenberg <ake.kullenb...@gmail.com>wrote:

> AFAIK there is no way to import custom pyside widgets in QtDesigner. Is
> there any particular reason for this? This is a huge shame, QtDesigner is a
> major time saver in terms of producing straightforward ui components such
> as dialogs. Other python gui frameworks really don't have anything like it
> to offer either, so it's definitely a big competitive advantage for
> pyside/qt. However If I can't use custom pyside widgets QtDesigner is a lot
> less useful IMHO.
> _______________________________________________
> PySide mailing list
> PySide@lists.pyside.org
> http://lists.pyside.org/listinfo/pyside
>
>
_______________________________________________
PySide mailing list
PySide@lists.pyside.org
http://lists.pyside.org/listinfo/pyside

Reply via email to