Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #25423

PyQt QCalendarWidget events question

Path csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!news.mixmin.net!news.musoftware.de!wum.musoftware.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From tinnews@isbd.co.uk
Newsgroups comp.lang.python
Subject PyQt QCalendarWidget events question
Date Mon, 16 Jul 2012 16:51:07 +0100
Lines 28
Message-ID <bspdd9-22s.ln1@chris.zbmc.eu> (permalink)
X-Trace individual.net 7zhsbla1aPQIHJyyBDwuTQ20+uEcaSzpHYr41tbWw/e/kQxgxinrABYaFqBIyPggs=
X-Orig-Path not-for-mail
Cancel-Lock sha1:82HWGu9RO2TdZ4gVVyWV6cLMsco=
User-Agent tin/2.0.0-20110823 ("Ardenistiel") (UNIX) (Linux/3.2.0-26-generic (x86_64))
Xref csiph.com comp.lang.python:25423

Show key headers only | View raw


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

Back to comp.lang.python | Previous | NextNext in thread | Find similar | Unroll thread


Thread

PyQt QCalendarWidget events question tinnews@isbd.co.uk - 2012-07-16 16:51 +0100
  Re: PyQt QCalendarWidget events question tinnews@isbd.co.uk - 2012-07-16 17:28 +0100
    Re: Re: PyQt QCalendarWidget events question John Posner <jjposner@optimum.net> - 2012-07-16 15:58 -0400
      Re: PyQt QCalendarWidget events question tinnews@isbd.co.uk - 2012-07-17 10:34 +0100
        Re: PyQt QCalendarWidget events question Chris Angelico <rosuav@gmail.com> - 2012-07-18 03:41 +1000

csiph-web