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
src_gui_itemviews_qitemeditorfactory.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]
5Q_PROPERTY(QColor color READ color WRITE setColor USER true)
6//! [0]
7
8
9//! [1]
10QItemEditorCreator<MyEditor> *itemCreator =
11 new QItemEditorCreator<MyEditor>("myProperty");
12
13QItemEditorFactory *factory = new QItemEditorFactory;
14//! [1]
15
16
17//! [setDefaultFactory]
18//! [2]
19QItemEditorFactory *editorFactory = new QItemEditorFactory;
20QItemEditorCreatorBase *creator = new QStandardItemEditorCreator<MyFancyDateTimeEdit>();
21editorFactory->registerEditor(QMetaType::QDateTime, creator);
22//! [2]
23
25//! [setDefaultFactory]
26
27
28//! [3]
29Q_PROPERTY(QColor color READ color WRITE setColor USER true)
30//! [3]
QItemEditorCreatorBase * creator
QItemEditorFactory * factory
QItemEditorFactory * editorFactory
[1]