Is it possible to connect slots of a model object to the GUI in QT4 -Designer?
- by Robert0
So I try to build a Model-View window using QTDesigner and C++.
For that reason I created a QOBject derived class as my model. It provides slots and signals to access it like: setFileName(QString) or fileNameChanged(QString).
I got a little into using signal drag and drop in QTDesigner and found it quite VA-Smalltalk-Like nice. After a while I was wondering if I could also connect my model to this. So is it possible to somehow introduce my model object into the Window/GUI and let QTDesigner connect signals and slots from the model object to the GUI.
In essence: Write for me:
connect( model, SIGNAL(fileNameChanged(QString)), ui->labelFn, SLOT(setText(QString)))
connect( ui-textEdit2, SIGNAL(textChanged(QString)), model, SLOT(setFileName(QString)))
Thanks for explaining