[Qt-interest] Trying to create custom Qt Designer plugin for real-time data

Friedemann Kleint Friedemann.Kleint at nokia.com
Thu Jan 21 10:15:36 CET 2010


Hi Keith,

to make the widget play nicely in Designer, make this modification:

--- Text_Channel.cc.orig        2010-01-21 09:44:57.000000000 +0100
+++ Text_Channel.cc     2010-01-21 09:45:09.000000000 +0100
@@ -35,7 +35,7 @@
         return;
     }

-    ui.setupUi(parent);
+    ui.setupUi(this);

     // there should be only one data poller for all channels
     if (!_data_poller)

> 3. When I create a new dialog and drag the text channel widget onto the
>  form, the timer for polling data stairts while I'm dragging but stops as
>  soon as I release (place) the widget.  But when I save this dialog and
>  then load the UI in designer, the timer works.

It is true that Designer also instantiates the widget to query its default 
properties and while dragging to grab a pixmap image to be shown. 
The findFormWindow()-trick does not really work for stuff that is done in the 
constructor, it is only useful for behavior  that is invoked later on. 
One way out would be to make the data_active property default 
to false and require the user to modify  it to activate it.

Regards,
Friedemann
-- 
Friedemann Kleint
Nokia, Qt Development Frameworks



More information about the Qt-interest-old mailing list