Discussion:
[Tutor] PyQt4 Draggable button
Ankit Pareek
2015-08-25 10:51:51 UTC
Permalink
How can I create Draggable buttons in PyQt4 , which can be moved using
mouse. Can I create using Qt Designer or I have to code.

Please help me.
Thanks in advance.
_______________________________________________
Tutor maillist - ***@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
Alan Gauld
2015-08-26 00:02:31 UTC
Permalink
Post by Ankit Pareek
How can I create Draggable buttons in PyQt4 , which can be moved using
mouse. Can I create using Qt Designer or I have to code.
This list is for questions about the Python language and standard
library so PyQt is a bit off topic and you might get a better response
asking on the PyQt 9or SIDE) forums.

However if it turns out there is not a standard "Draggable Button"
widget it should be relatively easy to build your own. You only
need to capture the mouse drag motion (look for a drag n drop
tutorial) and then redraw the GUI once it has been dropped.

How you redraw the GUI will be up to you - for example if some
widgets have properties specifying they should be on the left
and the user drops to the left of them do you obey the
original layout rules or over-rule them for the user?

HTH
--
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos


_______________________________________________
Tutor maillist - ***@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
Laura Creighton
2015-08-26 01:09:32 UTC
Permalink
Turns out this has been answered several times on Stack Overflow,
nobody mentioned using Designer, but there is plenty of code to
crib from.

Laura
_______________________________________________
Tutor maillist - ***@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor

Loading...