Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
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
5w->setWindowState(w->windowState() ^ Qt::WindowFullScreen);
7
8
10w->setWindowState((w->windowState() & ~Qt::WindowMinimized) | Qt::WindowActive);
12
13
15width = baseSize().width() + i * sizeIncrement().width();
16height = baseSize().height() + j * sizeIncrement().height();
18
19
21aWidget->window()->setWindowTitle("New Window Title");
23
24
28
29
34
35
38...
39painter.end();
40myWidget->render(this);
42
43
45setTabOrder(a, b); // a to b
46setTabOrder(b, c); // a to b to c
47setTabOrder(c, d); // a to b to c to d
49
50
52setTabOrder({a, b, c, d}); // a to b to c to d
54
55
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
62
63
66{
67 QSettings settings("MyCompany", "MyApp");
68 settings.setValue("geometry", saveGeometry());
70}
72
73
75QSettings settings("MyCompany", "MyApp");
76myWidget->restoreGeometry(settings.value("myWidget/geometry").toByteArray());
78
79
The QCloseEvent class contains parameters that describe a close event.
Definition qevent.h:562
The QPainter class performs low-level painting on widgets and other paint devices.
Definition qpainter.h:46
Returns a copy of the pixmap that is transformed using the given transformation transform and transfo...
Definition qpixmap.h:27
\inmodule QtCore
Definition qsettings.h:30
void setValue(QAnyStringView key, const QVariant &value)
Sets the value of setting key to value.
QVariant value(QAnyStringView key, const QVariant &defaultValue) const
Returns the value for setting key.
QByteArray toByteArray() const
Returns the variant as a QByteArray if the variant has userType() \l QMetaType::QByteArray or \l QMet...
virtual void closeEvent(QCloseEvent *event)
This event handler is called with the given event when Qt receives a window close request for a top-l...
Definition qwidget.cpp:9856
QSize size
the size of the widget excluding any window frame
Definition qwidget.h:113
QByteArray saveGeometry() const
Definition qwidget.cpp:7337
void render(QPaintDevice *target, const QPoint &targetOffset=QPoint(), const QRegion &sourceRegion=QRegion(), RenderFlags renderFlags=RenderFlags(DrawWindowBackground|DrawChildren))
Definition qwidget.cpp:5092
QOpenGLWidget * widget
[1]
@ WindowFullScreen
Definition qnamespace.h:255
@ WindowMinimized
Definition qnamespace.h:253
@ WindowActive
Definition qnamespace.h:256
@ IBeamCursor
GLboolean GLboolean GLboolean b
GLfloat GLfloat GLfloat w
[0]
GLint GLsizei GLsizei height
GLboolean GLboolean GLboolean GLboolean a
[7]
GLint GLsizei width
struct _cl_event * event
const GLubyte * c
QSettings settings("MySoft", "Star Runner")
[0]
setUpdatesEnabled(false)
[12]
widget render & pixmap
setCursor(Qt::IBeamCursor)
[3]
QPainter painter(this)
[7]
QSettings settings("MyCompany", "MyApp")
[11]
setTabOrder(a, b)
[8]
bigVisualChanges()