Results 1 to 3 of 3

Thread: about QCalendarWidget

  1. #1
    Join Date
    Oct 2008
    Location
    Beijing China
    Posts
    77
    Thanks
    21
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default about QCalendarWidget

    I want to subclass QCalendarWidget. By default 6 weeks are displayed in the calendar and I need to display the 5 weeks within the current month, that is to say, one week should be removed, how to do this?

    Any suggestions would be appreciated greatly, thank you

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: about QCalendarWidget

    The widget has a widget "QCalendarView inside it which is a subclass of QTableView. It also has QCalendarModel that is a regular Item Views model, so you might try to access it and apply a filter proxy between the model and the view. It has a chance to work.

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

    nifei (9th February 2009)

  4. #3
    Join Date
    Oct 2008
    Location
    Beijing China
    Posts
    77
    Thanks
    21
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: about QCalendarWidget

    Quote Originally Posted by wysota View Post
    The widget has a widget "QCalendarView inside it which is a subclass of QTableView. It also has QCalendarModel that is a regular Item Views model, so you might try to access it and apply a filter proxy between the model and the view. It has a chance to work.
    Sadly QCalendarModel is not provided to users....

Similar Threads

  1. How to set Style sheet for QCalendarWidget?
    By nifei in forum Qt Programming
    Replies: 1
    Last Post: 16th February 2009, 22:36
  2. Question about QCalendarWidget with PyQT
    By hf in forum Qt Programming
    Replies: 2
    Last Post: 21st April 2008, 22:40
  3. Problem repainting a subclassed QCalendarWidget
    By darkadept in forum Qt Programming
    Replies: 9
    Last Post: 28th September 2007, 23:54
  4. No QCalendarWidget in designer? 4.2.0-tp1
    By Spockmeat in forum Qt Tools
    Replies: 2
    Last Post: 9th August 2006, 18: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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.