[PyQt] Drag and Drop when using designer Designer

Shoemaker, Ronnie A (N-UNITED SPACE ALLIANCE, LLC) ronnie.a.shoemaker at lmco.com
Thu Mar 22 20:48:02 GMT 2012


>From all the examples I have seen using Drag and Drop I figured that I would need to code up my D&D classes and import them and connect signals to the Designer-generated code. In this thread I read:
> Is there any way to get the drop thing without altering the set up that
> setupUi method does?

You should never try to alter the generated code. If a subclass is
really needed you should create a new widget class and use the promoting
feature to have code generated that uses your new widget. See the
designer documentation for how that works.

Andreas

So now I am wondering should I try designing the whole thing with the designer and promote any subclasses items I have to code?
If so, does anyone know of a step-by-step tutorial dealing with this? I am needing to start out with two tree views that I can drag and drop between.
I am currently using subclasses of QTreeView.

I have started looking at the documentation on promoting widgets, but it could take me awhile to wrap my head around that.

Any suggestions would be appreciated.

Thanks,
Ron

----------------------------------------------------------------------
ronnie.a.shoemaker at lmco.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20120322/23446896/attachment.html>


More information about the PyQt mailing list