[PyQt] advice needed for dragging icons off a toolbar
Hans-Peter Jansen
hpj at urpla.net
Fri Sep 17 23:46:08 BST 2010
On Saturday 18 September 2010, 00:17:38 danny wrote:
> Howdy,
>
> I have a newbie question. I want to construct a toolbar with standard
> looking icons, only I don't want to click them, I want to drag them like
> the "draggable icons" example. I will have four buttons on the toolbar.
> What I don't know, is in which widget to begin the drag operation.
>
> In the ultimate class, I will overload the mousePressEvent, but which
> class is the best to overload. The choices would seem to be:
> QToolBar
> QToolButton,
> QIcon
>
> Which would be most preferable?
The natural choice would be QToolButton of course, but did you also
considered the surprising behavior change for your users (that don't expect
those items being draggable..)?
Pete
More information about the PyQt
mailing list