PDA

View Full Version : How to load custom widget with qt-4.1 version designer



jnana
17th February 2006, 13:03
I have some problem for custom widget with qt-4.1 version. I tried with the analogclock example provided with qt-4.1 version release. I modifed the class name from AnalogClock to Clock, did consequent changes with plugin class. Then I did qmake on .pro file and make. By make, libraries are created in $qtroot/plugins/designer dir. Now When I am running designer, custom widgets are not loaded in the designer. I went through the manual many times, not able to load custom widgets in designer.

Actually I am in initial stage for qt-4.1, therefore got the problem. Expecting a good response from u all.

Thanks
Jnana

wysota
17th February 2006, 13:08
Make sure you build the plugin in release mode. What file did you get after the build was complete? And did you put it into the appropriate place? ($QTDIR/plugins/designer/)

jnana
20th February 2006, 12:26
Hi Wysota,

Thanks alot, It is working fine with release mode.

Thanks
Jnana

strandtc
1st March 2006, 22:01
I have a question about plugins/custom widgets in Designer as well....

In Designer for 3.3, it allowed you to define a custom widget without actually creating a plugin. In Designer 4, you have to "promote" to a custom widget. When promoting to a custom widget, I don't see custom signals and slots.

Is there a way to define custom widgets in Designer 4.1 without using a plugin that will allow me to use the signals/slots that I have defined in my custom widget?

-Chris

wysota
2nd March 2006, 00:11
With Designer 4 you have to subclass anyway, so you can connect those in the subclass. I belive that's why the Trolls didn't put that functionality into widget promoting. It would just make things complex without any gain (remember that widget promotion is a substitution of one widget with another in the resulting code, nothing more).