diff options
Diffstat (limited to 'doc/src/snippets/code/src_gui_widgets_qdatetimeedit.cpp')
-rw-r--r-- | doc/src/snippets/code/src_gui_widgets_qdatetimeedit.cpp | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/doc/src/snippets/code/src_gui_widgets_qdatetimeedit.cpp b/doc/src/snippets/code/src_gui_widgets_qdatetimeedit.cpp new file mode 100644 index 0000000..796358d --- /dev/null +++ b/doc/src/snippets/code/src_gui_widgets_qdatetimeedit.cpp @@ -0,0 +1,39 @@ +//! [0] +QDateTimeEdit *dateEdit = new QDateTimeEdit(QDate::currentDate()); +dateEdit->setMinimumDate(QDate::currentDate().addDays(-365)); +dateEdit->setMaximumDate(QDate::currentDate().addDays(365)); +dateEdit->setDisplayFormat("yyyy.MM.dd"); +//! [0] + + +//! [1] +setDateTimeRange(min, max); +//! [1] + + +//! [2] +setMinimumDateTime(min); +setMaximumDateTime(max); +//! [2] + + +//! [3] +setDateRange(min, max); +//! [3] + + +//! [4] +setMinimumDate(min); +setMaximumDate(max); +//! [4] + + +//! [5] +setTimeRange(min, max); +//! [5] + + +//! [6] +setMinimumTime(min); +setMaximumTime(max); +//! [6] |