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
pointer.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#include <QApplication>
5#include <QLabel>
6#include <QPointer>
7
8int main(int argc, char *argv[])
9{
10 QApplication app(argc, argv);
11
12//! [0]
13 QPointer<QLabel> label = new QLabel;
14 label->setText("&Status:");
15//! [0]
16
17//! [1]
18 if (label)
19//! [1]
20//! [2]
21 label->show();
22//! [2]
23 return 0;
24}
int main(int argc, char *argv[])
[ctor_close]