Questions tagged [qcalendarwidget]
30 questions
1
vote
1 answer
Pop-up calendar widget of QDateEdit on mouseclick anywhere in text area and not just the down arrow,
I used event filter on my QDateEdit 'sdateEdit' as follows:
bool Class::eventFilter ( QObject *obj, QEvent *event )
{
if(event->type() == QEvent::MouseButtonPress)
{
sdateEdit->calendarWidget()->show();
}
else
…

shweta srivastav
- 21
- 6
1
vote
1 answer
How to disable other months days in QCalendarWidget
I am aiming to disable that users can click on days that aren't from the current month in a QCalendarWidget, so I subclassed the widget in order to do it. So far I could make those days don't render any text at all (great). This is the code:
class…

Saelyth
- 1,694
- 2
- 25
- 42
1
vote
1 answer
Is it possible to disable Saturdays and Sundays in QCalendarWidget?
I want the user to be able to select Monday, Tuesday, Wednesday, Thursday or Friday (weekdays) in a QCalendarWidget. But not Saturday or Sunday. (weekend)
Is this feature available for QCalendarWidget?
If not, how do I disable a date on the…

ukll
- 204
- 2
- 12
1
vote
2 answers
PyQt: Emit signal when cell entered in QCalendarWidget
In my Qt application I'm using the QCalendarWidget and I would like to get notified when the mouse enters a new cell of the calendar. I know that the QCalendarWidget is using a QTableView internally which inherits from QAbstractItemView and this…

Cilenco
- 6,951
- 17
- 72
- 152
0
votes
0 answers
Is it possible to make a custom calendar widget with PyQt5 that looks like this one?
Source: https://github.com/pyrochlore/obsidian-tracker
The image above comes from a plug-in for Obsidian.
The following picture is from a custom QCalendarWidget I made that shows a different color depending on the % of tasks completed for each…

exnunc
- 1
- 1
0
votes
1 answer
The QItemDelegate is not rendered in the same way across columns QCalendarWidget
I try to make a corner in the cells of my QCalendarWidget. So I made a QItemDelegate in which I draw my triangle.
As the screenshot shows, the delegate works fine on the first column, but is completely broken on the others.
I don't understand where…

Pixidream
- 13
- 3
0
votes
1 answer
Populating a QCalendarWidget
I created a GUI to show some running workouts via PyQt QCalendarWidget. The following code was based on these posts:
I want to put the text in pyqt QCalendarWidget
How to add text to PyQt QcalendarWidget
I created a subclass in order to overwrite…

Hotone
- 431
- 3
- 18
0
votes
1 answer
How to change color for inactive days in QDateEdit or QCalendarWidget
Help me please, my friends!I need to calendar widget look like this:
desired calendar
But i have a problem. I only get this:
my calendar
I need to do this: dates that are out of range (minimalDate, maximumDate) should be colored as inactive (main…

igorotvertka
- 87
- 1
- 7
0
votes
1 answer
Can't PaintCell after using QItemDelegate to change date position for a QCalendarWidget
I am trying to override QCalendarWidget's paintCell() method to paint a red outline on today's date cell and draw events that will be defined by the user. For my calendar, I used a QItemDelegate to change the alignment of the date flags so I would…

Streeter
- 23
- 5
0
votes
1 answer
How to add text to PyQt QcalendarWidget
How does one write into the QCalendarWidget cell? In python, I keep getting painter not active message. Can someone help me out with this?
qp = QtGui.QPainter(self)
qp.setPen(QtGui.QColor(168, 34, 3))
qp.setFont(QtGui.QFont('Decorative',…
0
votes
1 answer
Fetch data from qcalendar
How to fetch the data from Qcalendar. For example, when is select 21/10/2019, "Monday" will be fetched when I click the "ok" button
The following is my code:
from PyQt5 import QtCore, QtWidgets
from PyQt5.QtWidgets import QMainWindow, QVBoxLayout,…

BANGTAN SOPE
- 49
- 5
0
votes
1 answer
How to get date from QCalendarWidget object and set it as minimum date?
I had 2 QCalendarWidget objects and i need to set selected date from first object as minimum date in second calendar. My code for calendar looks like that
class Calendar(QtWidgets.QWidget):
def __init__(self, parent=None):
…

Sidney Lee
- 35
- 6
0
votes
1 answer
Painter error in paintCell() function when subclassing QCalendarWidget
I want to create calendar, that will mark several dates entered by user.
So I have subclassed QCalendarWidget and reimplemented painCell function.
Here is my simplified code:
MyCalendar::MyCalendar(QWidget *parent)
: QCalendarWidget(parent)
{ …

karollo
- 573
- 8
- 22
0
votes
1 answer
How to transfer date selection from calendar widget to QLineEdit
I'm playing around with PyQt5 (which I just started learning yesterday).
I'm trying to create a window/layout, with two entry boxes (to enter 'start' and 'end' dates), so that when each one is clicked, the QCalendarWidget is triggered to popup, and…

Manny
- 5
- 1
- 2
-1
votes
1 answer
PySide6 QCalendarWidget Qss style problem with month names
i have a weird problem with qss styling an QCalendarWidget
The months names get overlapped by the menu indicator.
Anyone have an idea why?

Lcross Portugal
- 73
- 8