Header:#include < QCalendarWidget >
qmake:QT += widgets
Since:Qt 4.2
Inherits:QWidget
This class was introduced in Qt 4.2.
Public Types
enum HorizontalHeaderFormat { SingleLetterDayNames, ShortDayNames, LongDayNames, NoHorizontalHeader }
enum SelectionMode { NoSelection, SingleSelection }
enum VerticalHeaderFormat { ISOWeekNumbers, NoVerticalHeader }
Properties
dateEditAcceptDelay : int
dateEditEnabled : bool
firstDayOfWeek : Qt::DayOfWeek
gridVisible : bool
horizontalHeaderFormat : HorizontalHeaderFormat
maximumDate : QDate
minimumDate : QDate
navigationBarVisible : bool
selectedDate : QDate
selectionMode : SelectionMode
verticalHeaderFormat : VerticalHeaderFormat
Public Functions
QCalendarWidget(QWidget *parent = nullptr)
virtual ~QCalendarWidget()
int dateEditAcceptDelay() const
QMap<QDate, QTextCharFormat> dateTextFormat() const
QTextCharFormat dateTextFormat(const QDate &date) const
Qt::DayOfWeek firstDayOfWeek() const
QTextCharFormat headerTextFormat() const
QCalendarWidget::HorizontalHeaderFormat horizontalHeaderFormat() const
bool isDateEditEnabled() const
bool isGridVisible() const
bool isNavigationBarVisible() const
QDate maximumDate() const
QDate minimumDate() const
int monthShown() const
QDate selectedDate() const
QCalendarWidget::SelectionMode selectionMode() const
void setDateEditAcceptDelay(int delay)
void setDateEditEnabled(bool enable)
void setDateTextFormat(const QDate &date, const QTextCharFormat &format)
void setFirstDayOfWeek(Qt::DayOfWeek dayOfWeek)
void setHeaderTextFormat(const QTextCharFormat &format)
void setHorizontalHeaderFormat(QCalendarWidget::HorizontalHeaderFormat format)
void setMaximumDate(const QDate &date)
void setMinimumDate(const QDate &date)
void setSelectionMode(QCalendarWidget::SelectionMode mode)
void setVerticalHeaderFormat(QCalendarWidget::VerticalHeaderFormat format)
void setWeekdayTextFormat(Qt::DayOfWeek dayOfWeek, const QTextCharFormat &format)
QCalendarWidget::VerticalHeaderFormat verticalHeaderFormat() const
QTextCharFormat weekdayTextFormat(Qt::DayOfWeek dayOfWeek) const
int yearShown() const
Reimplemented Public Functions
virtual bool event(QEvent *event) override
virtual bool eventFilter(QObject *watched, QEvent *event) override
virtual void keyPressEvent(QKeyEvent *event) override
virtual void mousePressEvent(QMouseEvent *event) override
virtual void resizeEvent(QResizeEvent *event) override