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_kernel_qwidget.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]
5w->setWindowState(w->windowState() ^ Qt::WindowFullScreen);
6//! [0]
7
8
9//! [1]
10w->setWindowState((w->windowState() & ~Qt::WindowMinimized) | Qt::WindowActive);
11//! [1]
12
13
14//! [2]
15width = baseSize().width() + i * sizeIncrement().width();
16height = baseSize().height() + j * sizeIncrement().height();
17//! [2]
18
19
20//! [3]
21aWidget->window()->setWindowTitle("New Window Title");
22//! [3]
23
24
25//! [6]
26setCursor(Qt::IBeamCursor);
27//! [6]
28
29
30//! [7]
31QPixmap pixmap(widget->size());
32widget->render(&pixmap);
33//! [7]
34
35
36//! [8]
38...
39painter.end();
40myWidget->render(this);
41//! [8]
42
43
44//! [9]
45setTabOrder(a, b); // a to b
46setTabOrder(b, c); // a to b to c
47setTabOrder(c, d); // a to b to c to d
48//! [9]
49
50
51//! [9.list]
52setTabOrder({a, b, c, d}); // a to b to c to d
53//! [9.list]
54
55
56//! [10]
57// WRONG
58setTabOrder(c, d); // c to d
59setTabOrder(a, b); // a to b AND c to d
60setTabOrder(b, c); // a to b to c, but not c to d
61//! [10]
62
63
64//! [11]
65void MyWidget::closeEvent(QCloseEvent *event)
66{
67 QSettings settings("MyCompany", "MyApp");
68 settings.setValue("geometry", saveGeometry());
69 QWidget::closeEvent(event);
70}
71//! [11]
72
73
74//! [12]
75QSettings settings("MyCompany", "MyApp");
76myWidget->restoreGeometry(settings.value("myWidget/geometry").toByteArray());
77//! [12]
78
79
80//! [13]
84//! [13]
setTabOrder(a, b)
[0]
setUpdatesEnabled(false)
[12]
QSettings settings("MyCompany", "MyApp")
[11]
setTabOrder({a, b, c, d})
[9]
QPainter painter(this)
[7]
bigVisualChanges()
QPixmap pixmap(":/splash.png")
[0]
int height
Definition qimage_p.h:46
int width
Definition qimage_p.h:45