blob: 62f43190016f1452fac227916b970dd935673789 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
//! [0]
QtSpinBoxFactory *factory;
QSet<QtIntPropertyManager *> managers = factory->propertyManagers();
//! [0]
//! [1]
QtBrowserItem *item;
QList<QtBrowserItem *> childrenItems = item->children();
QList<QtProperty *> childrenProperties = item->property()->subProperties();
//! [1]
//! [2]
QtProperty *property1, *property2, *property3;
property2->addSubProperty(property1);
property3->addSubProperty(property2);
QtAbstractPropertyBrowser *editor;
editor->addProperty(property1);
editor->addProperty(property2);
editor->addProperty(property3);
//! [2]
//! [3]
QtIntPropertyManager *intManager;
QtDoublePropertyManager *doubleManager;
QtProperty *myInteger = intManager->addProperty();
QtProperty *myDouble = doubleManager->addProperty();
QtSpinBoxFactory *spinBoxFactory;
QtDoubleSpinBoxFactory *doubleSpinBoxFactory;
QtAbstractPropertyBrowser *editor;
editor->setFactoryForManager(intManager, spinBoxFactory);
editor->setFactoryForManager(doubleManager, doubleSpinBoxFactory);
editor->addProperty(myInteger);
editor->addProperty(myDouble);
//! [3]
|