[Qt-interest] Qt designer widget plugins and drag/drop
Giacomo S.
giacomo.strangolino at elettra.trieste.it
Wed Mar 2 10:25:13 CET 2011
Hi, I am Giacomo from Elettra Synchrotron Radiation facility, Trieste,
ITaly.
I've written some Qt plugins for the Qt4 designer. It allows to create
custom widgets by dragging and dropping the items from the "Widget Box",
as usual.
The widgets are used to create control panels that read and write values
from the Synchrotron control system.
What I would like to do is the following.
I would like to drag some text from any desktop widget and drop it into
the Qt designer widget I am being editing. Then, execute a dialog from
which the user can choose the type of widget to place in the point where
the text was dropped.
For instance, while I am designing a control panel, I drag from a widget
on the desktop that provides "sr/power_supply/psb/Current" string as
Mime data. When I drop it into the designer widget I want a dialog to
appear to let the user choose to represent the current by means of a
simple label, a gauge, a Plot or anything else.
Is there a suggested clean way to implement this feature?
Thanks a lot
Giacomo.
More information about the Qt-interest-old
mailing list