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_widgets_qdatetimeedit.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]
5QDateTimeEdit *dateEdit = new QDateTimeEdit(QDate::currentDate());
6dateEdit->setMinimumDate(QDate::currentDate().addDays(-365));
7dateEdit->setMaximumDate(QDate::currentDate().addDays(365));
8dateEdit->setDisplayFormat("yyyy.MM.dd");
9//! [0]
10
11
12//! [1]
14//! [1]
15
16
17//! [2]
20//! [2]
21
22
23//! [3]
25//! [3]
26
27
28//! [4]
31//! [4]
32
33
34//! [5]
36//! [5]
37
38
39//! [6]
42//! [6]
setMinimumDateTime(min)
[1]
setDateTimeRange(min, max)
[0]
setTimeRange(min, max)
[4]
setDateRange(min, max)
[2]
setMaximumDateTime(max)
QDateTimeEdit * dateEdit
[0]