Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
tools_designer_src_lib_sdk_abstractpropertyeditor.cpp
Go to the documentation of this file.
1// Copyright (C) 2016 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
3
4//! [0]
5 auto *propertyEditor = formEditor->propertyEditor();
6
7 connect(propertyEditor, &QDesignerPropertyEditorInterface::propertyChanged,
8 this, &MyClass::checkProperty);
9//! [0]
10
11
12//! [1]
13 void checkProperty(const QString &property, const QVariant &value)
14 {
15 auto *propertyEditor = formEditor->propertyEditor();
16
17 auto *object = propertyeditor->object();
18 auto *widget = qobject_cast<MyCustomWidget *>(object);
19
20 if (widget && property == aProperty && value != expectedValue)
21 {...}
22 }
23//! [1]
connect(quitButton, &QPushButton::clicked, &app, &QCoreApplication::quit, Qt::QueuedConnection)
void checkProperty(const QString &property, const QVariant &value)
[0]