问题标签 [qcalendarwidget]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
python - 如何从 QCalendarWidget 对象获取日期并将其设置为最小日期?
我有 2 个 QCalendarWidget 对象,我需要将第一个对象的选定日期设置为第二个日历中的最小日期。我的日历代码看起来像这样
在其他类中,我创建了 2 个对象类型 Calendar
我试图像这样为 self.date2 设置最小日期
但它不起作用。它将当前日期设置为最小日期,而不是从第一个日历中选择日期。我知道它为什么会发生——因为 selectedDate() 在无法获取其他内容时自动设置当前日期。但是回到我的标题问题,如何设置从第一个日历中选择日期作为第二个日历的最小值?
python - QCalendarWidget 弹出窗口打开时发出信号?
这是绘制先前计算并保存在“日期”列表中的某些日期的单元格的函数,该函数工作正常,但我想在单击 QDateEdit 时调用该函数(显示弹出日历时)
self.dockwidget.date_from() # QDateEdit
self.dockwidget.date_from.calendarWidget() # QCalendarWidget
我知道有信号,但是当 QDate 被点击时它们都在工作: self.dockwidget.date_to.calendarWidget().activated.connect(self.paint_cell) self.dockwidget.date_to.calendarWidget().clicked.connect(self .paint_cell) self.dockwidget.date_to.calendarWidget().selectionChanged.connect(self.paint_cell)
但是当显示弹出窗口时,我必须在这些信号之前绘制单元格。
有谁知道那个信号是什么?
注意:代码将成为 QGis 插件的一部分
python - 如何自定义 QCalendarWidget?
我正在尝试将一些样式表应用于我的QCalendarWidget
,并且我已经进行了一些更改。这是我目前的代码:
结果是这样的:
问题是我找不到如何自定义绿色箭头、星期几和星期几。有什么建议么?
python - 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:
and In the result should be like as this pic as the developer says:
but When i run this code in my system i get everything write except month format, how can I have full name month format like May,June,... and not M01,M02,... this is result i get when i run the code in my system:
python - 在 Qt5 日历小部件中突出显示日期间隔
我想在选定的开始日期和结束日期之间的 CalendarWidget 中突出显示每一天。我的问题是 CalendarWidget 仅允许在 QTCreator 中进行 SingleSelection,但表示可以通过编程方式更改其他内容。
我发现了一些使用 QPainter 和 paintCell() 方法的提示,但我直到不知道从哪里开始。互联网对我没有帮助。我尝试先在 buttonClick 上更改一个日期,但即使这样也没有用,你能给我一个建议如何使用它吗?
python - 从 qcalendar 获取数据
如何从 Qcalendar 获取数据。For example, when is select 21/10/2019, "Monday" will be fetched when I click the "ok" button
以下是我的代码:
python - 如何在 QDateEdit 弹出 QCalendarWidget 中添加今天按钮
今天按钮是这样的
我的弹出日历小部件的图像:
我正在尝试使用 Python 中的 PyQt5 和日期选择器选项创建简单的 Gui。我需要在弹出的 QCalendarWidget 中的 QDateEdit 中添加今天按钮。