PDA

View Full Version : Widget: Go To Slot causes : The class definition of 'Ui:: could not be found



Astronomy
7th August 2010, 20:09
Hello,

I want to make a custom widget.
So i've created in the Designer a new widget and placed several radiobuttons, spinboxes,etc...
When i make a right click and select from the context menu: Go To Slot, the message comes:
The class definition of 'Ui::Mywidget could not be found
But the desinger had already created the *.h and *.cpp Files..???

Any ideas or hints?

thanks in advance,
Astronomy

ChrisW67
8th August 2010, 00:26
Have you included the "ui_*.h" file in the file that the slot would be created in?

Astronomy
8th August 2010, 10:34
Hi, i guess yes. In the *.cpp file..

#include "jobitem.h"
#include "ui_jobitem.h"

This was done automatically by the designer. Normally when i create a new dialog, adding a slot is simply done by a right click of the context menu. Now, i tried the first time to create a own widget, maybe i forgot something basic in the setup?

regards Astronomy

PS: i did: Add new: QT-Designer Form Class (creates a designer form*. ui with a matching class) and then i'd chosen from template "widget"..
i guess it is simple as that?

Astronomy
8th August 2010, 10:53
Ohh..

it was simpe as that.. i just tried a new *ui class, with a new widget for testing and its working..
i guess the designer had some error during creating the first files..

with the new one i'ts working... so i delete the old files :)

greetz Astronomy