PyQt QCalendarWidget events question

tinnews at isbd.co.uk tinnews at isbd.co.uk
Mon Jul 16 11:51:07 EDT 2012


I am trying to use the PyQt4 calendar widget to perform some different
actions on specific dates.  There are three events available:-

    selectionChanged()
    activated(QDate)
    clicked(QDate)

On trying all these out it would appear that the event handlers get
called as follows:-

    The clicked(QDate) event gets called if you click on an already
    selected date.

    The selectionChanged() and then the clicked(QDate) events are
    called when you click on a new date.

    The selectionChanged(), then the clicked(QDate) and then the
    activated(QDate) events are called if you double-click on a new date.

    The clicked(QDate) and then the activated(QDate) events are called
    if you double-click on an already selected date.


How can I get a single-click on a date to get 'Action1' and double-click
on a date to get 'Action2'?

-- 
Chris Green



More information about the Python-list mailing list