Core using a custom widget.....
Hi...i'm new using QT and this could be a silly question.....
I created a widget using the assistand example, the timeclock, but only using a widget created with the designer, i have ui_my_widget.h, an my_widget inherit class and another class which uses the "QDesignerCustomWidgetInterface", and finally a .pro with the same estructure that the clock example. I do a "make install" and the designer finds it, but when a drag the widget on the form the designer crash........
Someone Knows why this happend? or some tutorial step-by-step to add widget to the designer??
Thanks..
Re: Core using a custom widget.....
Re: Core using a custom widget.....
Yes , i readed the Qt documentation, and following the steps as the example says, but it crashes anyway........
if someone creates a widget and it works i will appreciate some basic steps to create my own, because i don't know what the is the problem......
even the core file have not symbols about the crash, my widget is compilled in debug mode....
My steps where:
1- create an "UI" with the designer, result a ui_my_widget.h
2- create an inherit class my_widget.h from the previous ui.h using the QDESIGNER_WIDGET_EXPORT macro in the class definition as the example says.
3- create another class inherint from QDesignerCustomWidgetInterface, with a new of may widget in the "createWidget" method and the Q_EXPORT_PLUGIN2 macro at the end of the file.
4- create a .pro with the proper plugin and lib parameters and do a "make install", the paths and files are correctly created into the QT paths.
5- The plugin appears in the designer but when i clicked over it there is only a blank box with the size of the XML method from the QDesignerCustomWidgetInterface inherit class.
6- finally when i drag and drop the widget over a frame the designer crashes
Maybe some step is wrong .....
Some help on compilation or other example custom plugin will be great...
Thanks....
Re: Core using a custom widget.....
I'd say you have an uninitialized pointer somewhere. Your plugin is fine if the widget shows up in Designer.