Hi Everybody,
I have calendar that is working fine.
Here is the function that display the full date:
def selectDate(self,date):
self.fullDate = str(date.day()) + " / " + str(date.month()) + " / " + str(date.year())
print "full date: %s" % self.fullDate
And here the code with the calendar:
def TabCalendar(self):
self.calendar = QtGui.QCalendarWidget(self.tab)
self.calendar.setGeometry(QtCore.QRect(self.x1, self.y1, self.x2, self.y2))
QtCore.QObject.connect(self.calendar, QtCore.SIGNAL("selectionChanged()"), self.selectDate)
QtCore.QObject.connect(self.calendar, QtCore.SIGNAL("clicked(QDate)"), self.selectDate)
To have direct access to selected day, I am calling the function selectDate based on connect event, and then using the 'date' to obtain the precise date.day and so on -- which is working fine.
The only awkward thing that is annoying me is that it gives the following warning..
TypeError: turbSchedule_selectDate() takes exactly 2 arguments (1 given)
Any suggestion to stop this TypeError warning?
All comments and suggestions are highly appreciated.