Questions tagged [qcalendarwidget]
30 questions
5
votes
5 answers
QDateEdit calendar popup
I'm trying to get a QDateEdit to allow the QCalendarWidget to show when requested (rather than just on clicking the down arrow). For example, somewhere in my class I should be able to say:
ui.datepicker.showCalendar()
and it should load up the…

Rob S
- 103
- 1
- 2
- 5
4
votes
1 answer
PyQt5 QCalendarWidget selectedDate format change
I've been trying to use QCalendarWidget to select dates that I will use later.
So I've created the widget, it shows and all look well.
Then I print the selected date in a textbrowser for testing, and I see the date format is bad.
This is the code…

Alon
- 99
- 1
- 9
3
votes
2 answers
How to add Today Button in QDateEdit Pop-up QCalendarWidget
Today Button like this
Image of my pop-up calendar widget:
I am trying to create simple Gui using PyQt5 in Python with date picker option. I need to add today button in QDateEdit in pop-up QCalendarWidget.

RamG
- 33
- 1
- 4
3
votes
1 answer
QCalendarWidget on year click using pyqt5
How to fire mouse click event on clicking in year option for QCalendarWidget.
onclick of year(2012),
i want to print some text using pyqt5
Can anyone help. Thanks in advance/

Sanjiv Kumar
- 71
- 7
2
votes
1 answer
Highlight date interval in a Qt5 Calendar Widget
I want to highlight every day in a CalendarWidget that is between a selected start and end date.
My problem is that a CalendarWidget only allows SingleSelection in QTCreator but says that other things can be changed programmatically though.
I found…

Heini
- 295
- 2
- 10
2
votes
1 answer
making qt calendar arrows larger
I use the QCalendarWidget to create a calendar.
I made the calendar and its font larger, but I don't know how to make the arrows of the calendar larger too.
By arrows, I mean to the green ones at the top, that let you go back and forth.
I am…

Mika Li
- 107
- 1
- 8
2
votes
1 answer
How to apply qss to a QCalendarWidget?
Good evening I am trying to generate a calendar like the one in the image:
So far what I have achieved with the QSS is this:
And this is the QSS that I have used
QCalendarWidget QAbstractItemView
{
selection-background-color: #042944;…

Mystic_Force
- 263
- 3
- 12
1
vote
1 answer
issues trying to color date cell
I'm having some issues trying to re-color a date cell after its selection selection using a calendar created in QT Designer and converted via pyuic 4.
So far I have seen some similar questions about re-coloring cells or rows of tables/tree widgets -…

Damo
- 11
- 1
- 3
1
vote
2 answers
How to color disabled date in QcalendarWidget
I'm trying to style my QcalendarWidget using CSS in PySide2, an set my maximum date to 22/12/2022. I'm able to change the color of text for next month to green and normal date to white, but is there any way to change the color for the date in…

leo
- 101
- 6
1
vote
1 answer
PyQt5: QCalendarWidget reset font of a de-selected date
I've created a calendar widget with its styleSheet, current date text format and set up date selection via .clicked function.
#setting up calendar
self.dateWidget = QCalendarWidget()
#setting up current date font format (on the app…

Outlaw
- 307
- 1
- 3
- 12
1
vote
1 answer
Change Date Position To Top Left in QCalendarWidget
I am looking for a way to change the position of the date number in each cell of the QCalendarWidget (i.e., "1, 2, 3, 4... 31"). I would like it to be in the top left corner so I can have more room to paint events in date cells.
Image Explanation:

Streeter
- 23
- 5
1
vote
1 answer
Adding items to a QTableView within QCalendarWidget
I'm currently making a to-do application which has a calendar. Whenever the user has an event on a specific date, A red circle appears in the top left corner. Whenever the user double clicks on the date, I want it to display a new window with…

Silent Beast
- 119
- 2
- 12
1
vote
1 answer
Full name month format in QCalendar sample
I need a calendar widget for the app I am writing in PyQt5 and I found this sample source code:
import sys
from PyQt5 import *
from PyQt5.QtWidgets import QApplication, QCalendarWidget, QWidget, QLabel
from PyQt5.QtCore import *
from PyQt5.QtGui…

M.H Mighani
- 196
- 5
- 19
1
vote
1 answer
How to customize QCalendarWidget?
I'm trying to apply some stylesheets to my QCalendarWidget, and I already made some changes. Here is my code at the moment:
QCalendarWidget QWidget{
background-color:magenta;
color: green;
}
QCalendarWidget…

Piontk
- 93
- 1
- 6
1
vote
2 answers
Signal when QCalendarWidget popup opens?
Here is function which is painting cells of some dates that were previously calculated and saved in the "dates" list, function is working fine but I want to call that function when QDateEdit is clicked(when popup calendar is shown)
def…

ncica
- 7,015
- 1
- 15
- 37