Results 1 to 16 of 16

Thread: Simulating a left clic on a calendar widget

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #15
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,376
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Thanks
    4
    Thanked 5,019 Times in 4,795 Posts
    Wiki edits
    10

    Default Re: Simulating a left clic on a calendar widget

    QCalendarWidget is really composed of a couple of other widgets. The main widget is the table you see that displays days of month. This table is a QTableView and can be extracted from the calendar widget using QObject::findChild(). Once you have that widget, you can access its API including QAbstractItemView::itemAt() which will return you the day of month at a specified point in the view's viewport coordinates. Then you can use QCalendarWidget::setSelectedDate() to select that date.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  2. The following user says thank you to wysota for this useful post:

    saimel (30th June 2011)

Similar Threads

  1. Opensource Calendar Widget
    By donmorr in forum Qt Tools
    Replies: 5
    Last Post: 15th February 2012, 18:54
  2. Calendar Widget - Change cell colour
    By Gavin Harper in forum Qt Programming
    Replies: 1
    Last Post: 15th March 2011, 08:31
  3. Replies: 10
    Last Post: 29th May 2010, 18:42
  4. How to call a function when i clic a button?
    By trend900 in forum Newbie
    Replies: 2
    Last Post: 22nd January 2009, 16:40
  5. Calendar widget with selectionMode != SingleSelection
    By Tamara in forum Qt Programming
    Replies: 2
    Last Post: 28th September 2007, 10:13

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.