PDA

View Full Version : QT Designer and autorecognizing slots



QPlace
14th May 2009, 17:57
In my typical case I create a form (_frm) and then manually add it to the dialog class (MyDialog) as:
class Mydialog : QDialog
{
...
private ui::frm _frm;
}

Naturally, when I edit ui::frm in QT designer I only see default slots. So, if I add a slot in the code like this:
...
public slots:
void DoSmth();
}

I then have to add "DoSmth" as custom slot in QT designer. Only then this slot becomes available for assignment.

Question: Is it possible to configure the enviroment in such a way that it will always read custom slot definitions from MyDialog so they will be always available as custom slots in QT Designer?

pospiech
16th May 2009, 18:11
As far as I know such functionality was intentionally never added to the Designer.
Qt Software wants developers to write connects in code and not do this graphically.

Since I hardly connect signals of widgets direct to slots of other widgets I almost never use the signal slot functionality in designer.