[Qt-interest] Can I enable a user to drag and place a, for example, QPushButton on a form?
Davor J.
DavorJ at live.com
Fri Feb 12 16:19:05 CET 2010
You have read this right?: http://qt.nokia.com/doc/4.6/dnd.html
Have you studied the Qt examples mentioned there?
There is also a whole chapter about drag & drop in Blanchette's book about
Qt. (The old first edition is freely distributed.) There is an example about
moving QListWidgetItems from QListWidget to QListWidget if I remeber
correctly.
Regards,
Davor
"Robert Wood" <robert.wood at apostrophe.co.uk> wrote in message
news:4B756D03.2080601 at apostrophe.co.uk...
>I would like to enable a user to create a simple form, a little like Qt
>Designer, only way simpler. So, rather than clicking on something to
>initiate an action, all it would do, would enable the use to pick up the
>widget ad place it somewhere else on the form.
>
> I have searched round Google for hours on this and found a few examples of
> what looks like what I need to do, but when I try and implement it, it
> flat refuses to work. I am sure what I want is possible, I have seen
> articles talking about reimplementing things like mouseMoveEvents and
> indeed tried that, but the closest I could get was clicking on the form
> and the whole form bing dragged rather than the QWidget!
>
> Does anyone have any example code of just taking something really simple
> like a QPushButton that can be moved around a form? Been going round in
> circles for way too long now. ;~)
>
> Many thanks!
>
> Rob
More information about the Qt-interest-old
mailing list