blob: bbc396fcff6ec97937d9e082df72443b83bd3911 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
//! [0]
QDesignerPropertyEditorInterface *propertyEditor = 0;
propertyEditor = formEditor->propertyEditor();
connect(propertyEditor, SIGNAL(propertyChanged(QString, QVariant)),
this, SLOT(checkProperty(QString, QVariant)));
//! [0]
//! [1]
void checkProperty(QString property, QVariant value) {
QDesignerPropertyEditorInterface *propertyEditor = 0;
propertyEditor = formEditor->propertyEditor();
QObject *object = propertyeditor->object();
MyCustomWidget *widget = qobject_cast<MyCustomWidget>(object);
if (widget && property == aProperty && value != expectedValue)
{...}
}
//! [1]
|