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// Qt-Security score:significant reason:default
4
5//! [0]
6 auto *propertyEditor = formEditor->propertyEditor();
7
8 connect(propertyEditor, &QDesignerPropertyEditorInterface::propertyChanged,
9 this, &MyClass::checkProperty);
10//! [0]
11
12
13//! [1]
14 void checkProperty(const QString &property, const QVariant &value)
15 {
16 auto *propertyEditor = formEditor->propertyEditor();
17
18 auto *object = propertyeditor->object();
19 auto *widget = qobject_cast<MyCustomWidget *>(object);
20
21 if (widget && property == aProperty && value != expectedValue)
22 {...}
23 }
24//! [1]
connect(manager, &QNetworkAccessManager::finished, this, &MyClass::replyFinished)
void checkProperty(const QString &property, const QVariant &value)
[0]