Logo Search packages:      
Sourcecode: qt4-x11 version File versions

tools.designer.src.lib.sdk.abstractpropertyeditor.cpp

//! [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]



Generated by  Doxygen 1.6.0   Back to index