Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
src_gui_widgets_qlabel.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
5QLabel *label = new QLabel(this);
7label->setText("first line\nsecond line");
10
11
14QLabel *phoneLabel = new QLabel("&Phone:", this);
17
18
21QLabel *nameLabel = new QLabel("&Name:", this);
23QLineEdit *phoneEdit = new QLineEdit(this);
24QLabel *phoneLabel = new QLabel("&Phone:", this);
26// (layout setup not shown)
@ Sunken
Definition qframe.h:51
@ Panel
Definition qframe.h:41
The QLabel widget provides a text or image display.
Definition qlabel.h:20
void setBuddy(QWidget *)
Sets this label's buddy to buddy.
Definition qlabel.cpp:1169
The QLineEdit widget is a one-line text editor.
Definition qlineedit.h:28
@ AlignRight
Definition qnamespace.h:145
@ AlignBottom
Definition qnamespace.h:153
GLuint GLsizei const GLchar * label
[43]
QLabel * nameLabel
QLineEdit * phoneEdit
[0]
QLabel * phoneLabel
QLineEdit * nameEdit
[1]