blob: b80c59ead5d5b12dc6300757bfc0eaafcd1b5194 (
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
|
//! [0]
QDesignerWidgetBoxInterface *widgetBox = 0:
widgetBox = formEditor->widgetBox();
widgetBox->load();
//! [0]
//! [1]
QString originalFile = widgetBox->fileName();
widgetBox->setFileName("myWidgetBox.xml");
widgetBox->save();
//! [1]
//! [2]
widgetBox->setFileName(originalFile);
widgetBox->load();
//! [2]
//! [3]
if (widgetBox->filename() != "myWidgetBox.xml") {
widgetBox->setFileName("myWidgetBox.xml");
widgetBox->load();
}
//! [3]
|