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_abstractwidgetbox.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 *widgetBox = formEditor->widgetBox();
6
7 widgetBox->load();
8//! [0]
9
10
11//! [1]
12 QString originalFile = widgetBox->fileName();
13
14 widgetBox->setFileName("myWidgetBox.xml");
15 widgetBox->save();
16//! [1]
17
18
19//! [2]
20 widgetBox->setFileName(originalFile);
21 widgetBox->load();
22//! [2]
23
24
25//! [3]
26 if (widgetBox->filename() != "myWidgetBox.xml") {
27 widgetBox->setFileName("myWidgetBox.xml");
28 widgetBox->load();
29 }
30//! [3]