Skip to content

PythonQt.QtGui.QCalendarWidget · declarations 001

Back to PythonQt.QtGui.QCalendarWidget

HorizontalHeaderFormat instance-attribute

HorizontalHeaderFormat: type

int([x]) -> integer int(x, base=10) -> integer

Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.int(). For floating point numbers, this truncates towards zero.

If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by '+' or '-' and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal.

int('0b100', base=0) 4

ISOWeekNumbers instance-attribute

ISOWeekNumbers: Any

LongDayNames instance-attribute

LongDayNames: Any

NoHorizontalHeader instance-attribute

NoHorizontalHeader: Any

NoVerticalHeader instance-attribute

NoVerticalHeader: Any

ShortDayNames instance-attribute

ShortDayNames: Any

SingleLetterDayNames instance-attribute

SingleLetterDayNames: Any

VerticalHeaderFormat instance-attribute

VerticalHeaderFormat: type

int([x]) -> integer int(x, base=10) -> integer

Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.int(). For floating point numbers, this truncates towards zero.

If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by '+' or '-' and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal.

int('0b100', base=0) 4

activated

activated(*args: Any, **kwargs: Any) -> Any

Native PythonQt.QtGui.QCalendarWidget.activated; argument details are not documented.

Supplemental documentation: Qt 5 reference:

[signal] void QCalendarWidget::activated(const QDate \&date)

This signal is emitted whenever the user presses the Return or Enter key or double-clicks a date in the calendar widget.

Source: https://doc.qt.io/archives/qt-5.15/qcalendarwidget.html#activated

clicked

clicked(*args: Any, **kwargs: Any) -> Any

Native PythonQt.QtGui.QCalendarWidget.clicked; argument details are not documented.

Supplemental documentation: Qt 5 reference:

[signal] void QCalendarWidget::clicked(const QDate \&date)

This signal is emitted when a mouse button is clicked. The date the mouse was clicked on is specified by date. The signal is only emitted when clicked on a valid date, e.g., dates are not outside the minimumDate() and maximumDate(). If the selection mode is NoSelection, this signal will not be emitted.

Source: https://doc.qt.io/archives/qt-5.15/qcalendarwidget.html#clicked

currentPageChanged

currentPageChanged(*args: Any, **kwargs: Any) -> Any

Native PythonQt.QtGui.QCalendarWidget.currentPageChanged; argument details are not documented.

Supplemental documentation: Qt 5 reference:

[signal] void QCalendarWidget::currentPageChanged(int year, int month)

This signal is emitted when the currently shown month is changed. The new year and month are passed as parameters.

See also setCurrentPage().

Source: https://doc.qt.io/archives/qt-5.15/qcalendarwidget.html#currentPageChanged

customContextMenuRequested

customContextMenuRequested(*args: Any, **kwargs: Any) -> Any

Native PythonQt.QtGui.QCalendarWidget.customContextMenuRequested; argument details are not documented.

dateEditAcceptDelay instance-attribute

dateEditAcceptDelay: int

Qt 5 reference:

dateEditAcceptDelay : int

This property holds the time an inactive date edit is shown before its contents are accepted

If the calendar widget's date edit is enabled, this property specifies the amount of time (in milliseconds) that the date edit remains open after the most recent user input. Once this time has elapsed, the date specified in the date edit is accepted and the popup is closed.

By default, the delay is defined to be 1500 milliseconds (1.5 seconds).

This property was introduced in Qt 4.3.

Access functions:

int dateEditAcceptDelay() const
void setDateEditAcceptDelay(int delay)

Source: https://doc.qt.io/archives/qt-5.15/qcalendarwidget.html#dateEditAcceptDelay

dateEditEnabled instance-attribute

dateEditEnabled: Any

Qt 5 reference:

dateEditEnabled : bool

This property holds whether the date edit popup is enabled

If this property is enabled, pressing a non-modifier key will cause a date edit to popup if the calendar widget has focus, allowing the user to specify a date in the form specified by the current locale.

By default, this property is enabled.

The date edit is simpler in appearance than QDateEdit, but allows the user to navigate between fields using the left and right cursor keys, increment and decrement individual fields using the up and down cursor keys, and enter values directly using the number keys.

This property was introduced in Qt 4.3.

Access functions:

bool isDateEditEnabled() const
void setDateEditEnabled(bool enable)

See also QCalendarWidget::dateEditAcceptDelay.

Source: https://doc.qt.io/archives/qt-5.15/qcalendarwidget.html#dateEditEnabled

dateTextFormat

dateTextFormat(date: Any) -> dict

X.dateTextFormat(date) -> dict

Supplemental documentation: Qt 5 reference:

QMap\<QDate, QTextCharFormat> QCalendarWidget::dateTextFormat() const

Returns a QMap from QDate to QTextCharFormat showing all dates that use a special format that alters their rendering.

See also setDateTextFormat().

QTextCharFormat QCalendarWidget::dateTextFormat(const QDate \&date) const

Returns a QTextCharFormat for date. The char format can be be empty if the date is not renderd specially.

Upstream PySide2 reference signatures (binding differences may apply):

dateTextFormat(self) -> typing.Dict[PySide2.QtCore.QDate, PySide2.QtGui.QTextCharFormat]
dateTextFormat(self, date: PySide2.QtCore.QDate) -> PySide2.QtGui.QTextCharFormat

Source: https://doc.qt.io/archives/qt-5.15/qcalendarwidget.html#dateTextFormat

destroyed

destroyed(*args: Any, **kwargs: Any) -> Any

Native PythonQt.QtGui.QCalendarWidget.destroyed; argument details are not documented.

event

event(event: Any) -> bool

X.event(event) -> bool

Supplemental documentation: Qt 5 reference:

[override virtual protected] bool QCalendarWidget::event(QEvent *event)

Reimplements: QWidget::event(QEvent *event).

Upstream PySide2 reference signatures (binding differences may apply):

event(self, event: PySide2.QtCore.QEvent) -> bool

Source: https://doc.qt.io/archives/qt-5.15/qcalendarwidget.html#event

eventFilter

eventFilter(watched: Any, event: Any) -> bool

X.eventFilter(watched, event) -> bool

Supplemental documentation: Qt 5 reference:

[override virtual protected] bool QCalendarWidget::eventFilter(QObject *watched, QEvent *event)

Reimplements: QObject::eventFilter(QObject *watched, QEvent *event).

Upstream PySide2 reference signatures (binding differences may apply):

eventFilter(self, watched: PySide2.QtCore.QObject, event: PySide2.QtCore.QEvent) -> bool

Source: https://doc.qt.io/archives/qt-5.15/qcalendarwidget.html#eventFilter

firstDayOfWeek instance-attribute

firstDayOfWeek: Any

Qt 5 reference:

firstDayOfWeek : Qt::DayOfWeek

This property holds a value identifying the day displayed in the first column.

By default, the day displayed in the first column is the first day of the week for the calendar's locale.

Access functions:

Qt::DayOfWeek firstDayOfWeek() const
void setFirstDayOfWeek(Qt::DayOfWeek dayOfWeek)

Source: https://doc.qt.io/archives/qt-5.15/qcalendarwidget.html#firstDayOfWeek

gridVisible instance-attribute

gridVisible: Any

Qt 5 reference:

gridVisible : bool

This property holds whether the table grid is displayed.

QCalendarWidget *calendar; calendar->setGridVisible(true);

The default value is false.

Access functions:

bool isGridVisible() const
void setGridVisible(bool show)

Source: https://doc.qt.io/archives/qt-5.15/qcalendarwidget.html#gridVisible

headerTextFormat

headerTextFormat() -> Any

X.headerTextFormat() -> PythonQt.QtGui.QTextCharFormat

Supplemental documentation: Qt 5 reference:

QTextCharFormat QCalendarWidget::headerTextFormat() const

Returns the text char format for rendering the header.

See also setHeaderTextFormat().

Upstream PySide2 reference signatures (binding differences may apply):

headerTextFormat(self) -> PySide2.QtGui.QTextCharFormat

Source: https://doc.qt.io/archives/qt-5.15/qcalendarwidget.html#headerTextFormat

horizontalHeaderFormat instance-attribute

horizontalHeaderFormat: Any

Qt 5 reference:

horizontalHeaderFormat : HorizontalHeaderFormat

This property holds the format of the horizontal header.

The default value is QCalendarWidget::ShortDayNames.

Access functions:

QCalendarWidget::HorizontalHeaderFormat horizontalHeaderFormat() const
void setHorizontalHeaderFormat(QCalendarWidget::HorizontalHeaderFormat format)

Source: https://doc.qt.io/archives/qt-5.15/qcalendarwidget.html#horizontalHeaderFormat

isDateEditEnabled

isDateEditEnabled() -> bool

X.isDateEditEnabled() -> bool

Upstream PySide2 reference signatures (binding differences may apply):

isDateEditEnabled(self) -> bool

Source: https://doc.qt.io/archives/qt-5.15/qcalendarwidget.html#isDateEditEnabled

isGridVisible

isGridVisible() -> bool

X.isGridVisible() -> bool

Upstream PySide2 reference signatures (binding differences may apply):

isGridVisible(self) -> bool

Source: https://doc.qt.io/archives/qt-5.15/qcalendarwidget.html#isGridVisible

isNavigationBarVisible

isNavigationBarVisible() -> bool

X.isNavigationBarVisible() -> bool

Upstream PySide2 reference signatures (binding differences may apply):

isNavigationBarVisible(self) -> bool

Source: https://doc.qt.io/archives/qt-5.15/qcalendarwidget.html#isNavigationBarVisible

keyPressEvent

keyPressEvent(event: Any) -> None

X.keyPressEvent(event)

Supplemental documentation: Qt 5 reference:

[override virtual protected] void QCalendarWidget::keyPressEvent(QKeyEvent *event)

Reimplements: QWidget::keyPressEvent(QKeyEvent *event).

Upstream PySide2 reference signatures (binding differences may apply):

keyPressEvent(self, event: PySide2.QtGui.QKeyEvent) -> None

Source: https://doc.qt.io/archives/qt-5.15/qcalendarwidget.html#keyPressEvent

maximumDate instance-attribute

maximumDate: QDate

Qt 5 reference:

maximumDate : QDate

This property holds the maximum date of the currently specified date range.

The user will not be able to select a date which is after the currently set maximum date.

QCalendarWidget *calendar; calendar->setGridVisible(true); calendar->setMaximumDate(QDate(2006, 7, 3));

The default maximum date is December 31, 9999 CE.

When setting a maximum date, the minimumDate and selectedDate properties are adjusted if the selection range becomes invalid. If the provided date is not a valid QDate object, the setMaximumDate() function does nothing.

Access functions:

QDate maximumDate() const
void setMaximumDate(const QDate \&date)

See also setDateRange().

Source: https://doc.qt.io/archives/qt-5.15/qcalendarwidget.html#maximumDate

minimumDate instance-attribute

minimumDate: QDate

Qt 5 reference:

minimumDate : QDate

This property holds the minimum date of the currently specified date range.

The user will not be able to select a date that is before the currently set minimum date.

QCalendarWidget *calendar; calendar->setGridVisible(true); calendar->setMinimumDate(QDate(2006, 6, 19));

The default minimum date is November 25, 4714 BCE.

When setting a minimum date, the maximumDate and selectedDate properties are adjusted if the selection range becomes invalid. If the provided date is not a valid QDate object, the setMinimumDate() function does nothing.

Access functions:

QDate minimumDate() const
void setMinimumDate(const QDate \&date)

See also setDateRange().

Source: https://doc.qt.io/archives/qt-5.15/qcalendarwidget.html#minimumDate

minimumSizeHint instance-attribute

minimumSizeHint: QSize

Qt 5 reference:

[override virtual] QSize QCalendarWidget::minimumSizeHint() const

Reimplements an access function for property: QWidget::minimumSizeHint.

Source: https://doc.qt.io/archives/qt-5.15/qcalendarwidget.html#minimumSizeHint

monthShown

monthShown() -> int

X.monthShown() -> int

Supplemental documentation: Qt 5 reference:

int QCalendarWidget::monthShown() const

Returns the currently displayed month. Months are numbered from 1 to 12.

See also yearShown() and setCurrentPage().

Upstream PySide2 reference signatures (binding differences may apply):

monthShown(self) -> int

Source: https://doc.qt.io/archives/qt-5.15/qcalendarwidget.html#monthShown

mousePressEvent

mousePressEvent(event: Any) -> None

X.mousePressEvent(event)

Supplemental documentation: Qt 5 reference:

[override virtual protected] void QCalendarWidget::mousePressEvent(QMouseEvent *event)

Reimplements: QWidget::mousePressEvent(QMouseEvent *event).

Upstream PySide2 reference signatures (binding differences may apply):

mousePressEvent(self, event: PySide2.QtGui.QMouseEvent) -> None

Source: https://doc.qt.io/archives/qt-5.15/qcalendarwidget.html#mousePressEvent

navigationBarVisible instance-attribute

navigationBarVisible: Any

Qt 5 reference:

navigationBarVisible : bool

This property holds whether the navigation bar is shown or not

When this property is true (the default), the next month, previous month, month selection, year selection controls are shown on top.

When the property is set to false, these controls are hidden.

This property was introduced in Qt 4.3.

Access functions:

bool isNavigationBarVisible() const
void setNavigationBarVisible(bool visible)

Source: https://doc.qt.io/archives/qt-5.15/qcalendarwidget.html#navigationBarVisible

objectNameChanged

objectNameChanged(*args: Any, **kwargs: Any) -> Any

Native PythonQt.QtGui.QCalendarWidget.objectNameChanged; argument details are not documented.

paintCell

paintCell(painter: Any, rect: Any, date: Any) -> None

X.paintCell(painter, rect, date)

Supplemental documentation: Qt 5 reference:

[virtual protected] void QCalendarWidget::paintCell(QPainter *painter, const QRect \&rect, const QDate \&date) const

Paints the cell specified by the given date, using the given painter and rect.

Upstream PySide2 reference signatures (binding differences may apply):

paintCell(self, painter: PySide2.QtGui.QPainter, rect: PySide2.QtCore.QRect, date: PySide2.QtCore.QDate) -> None

Source: https://doc.qt.io/archives/qt-5.15/qcalendarwidget.html#paintCell

resizeEvent

resizeEvent(event: Any) -> None

X.resizeEvent(event)

Supplemental documentation: Qt 5 reference:

[override virtual protected] void QCalendarWidget::resizeEvent(QResizeEvent *event)

Reimplements: QWidget::resizeEvent(QResizeEvent *event).

Upstream PySide2 reference signatures (binding differences may apply):

resizeEvent(self, event: PySide2.QtGui.QResizeEvent) -> None

Source: https://doc.qt.io/archives/qt-5.15/qcalendarwidget.html#resizeEvent

selectedDate instance-attribute

selectedDate: QDate

Qt 5 reference:

selectedDate : QDate

This property holds the currently selected date.

The selected date must be within the date range specified by the minimumDate and maximumDate properties. By default, the selected date is the current date.

Access functions:

QDate selectedDate() const
void setSelectedDate(const QDate \&date)

See also setDateRange().

Source: https://doc.qt.io/archives/qt-5.15/qcalendarwidget.html#selectedDate

selectionChanged

selectionChanged(*args: Any, **kwargs: Any) -> Any

Native PythonQt.QtGui.QCalendarWidget.selectionChanged; argument details are not documented.

Supplemental documentation: Qt 5 reference:

[signal] void QCalendarWidget::selectionChanged()

This signal is emitted when the currently selected date is changed.

The currently selected date can be changed by the user using the mouse or keyboard, or by the programmer using setSelectedDate().

See also selectedDate().

Source: https://doc.qt.io/archives/qt-5.15/qcalendarwidget.html#selectionChanged

selectionMode instance-attribute

selectionMode: Any

Qt 5 reference:

selectionMode : SelectionMode

This property holds the type of selection the user can make in the calendar

When this property is set to SingleSelection, the user can select a date within the minimum and maximum allowed dates, using either the mouse or the keyboard.

When the property is set to NoSelection, the user will be unable to select dates, but they can still be selected programmatically. Note that the date that is selected when the property is set to NoSelection will still be the selected date of the calendar.

The default value is SingleSelection.

Access functions:

QCalendarWidget::SelectionMode selectionMode() const
void setSelectionMode(QCalendarWidget::SelectionMode mode)

Source: https://doc.qt.io/archives/qt-5.15/qcalendarwidget.html#selectionMode

setCurrentPage

setCurrentPage(year: int, month: int) -> None

X.setCurrentPage(year, month)

Supplemental documentation: Qt 5 reference:

[slot] void QCalendarWidget::setCurrentPage(int year, int month)

Displays the given month of the given year without changing the selected date. Use the setSelectedDate() function to alter the selected date.

The currently displayed month and year can be retrieved using the monthShown() and yearShown() functions respectively.

See also yearShown(), monthShown(), showPreviousMonth(), showNextMonth(), showPreviousYear(), and showNextYear().

Upstream PySide2 reference signatures (binding differences may apply):

setCurrentPage(self, year: int, month: int) -> None

Source: https://doc.qt.io/archives/qt-5.15/qcalendarwidget.html#setCurrentPage

setDateEditAcceptDelay

setDateEditAcceptDelay(delay: int) -> None

X.setDateEditAcceptDelay(delay)

Upstream PySide2 reference signatures (binding differences may apply):

setDateEditAcceptDelay(self, delay: int) -> None

Source: https://doc.qt.io/archives/qt-5.15/qcalendarwidget.html#setDateEditAcceptDelay