Results 1 to 2 of 2

Thread: Subclass QCalendarWidget?

  1. #1
    Join Date
    Feb 2011
    Location
    Latvia
    Posts
    139
    Thanks
    24
    Thanked 6 Times in 6 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Subclass QCalendarWidget?

    My new task is to make a Calendar, that looks like this:
    http://img222.imageshack.us/i/calendarx.jpg/

    I wonder - is that even possible?
    If yes - then what would be the sane way to do it? I mean - the only idea i have now - using parallel QTableWidget and QCalendarWidget, get the dates from QCalendarWidget and using SetItem on each QTableWidget... And I don't this is the best and easiest way to do this...

  2. #2
    Join Date
    Feb 2011
    Location
    Latvia
    Posts
    139
    Thanks
    24
    Thanked 6 Times in 6 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Subclass QCalendarWidget?

    I was told on another forum that i could Subclass the QCalendarWidget, and then rewrite function:
    virtual void paintCell ( QPainter * painter, const QRect & rect, const QDate & date ) const

    Is this a possible solution?

Similar Threads

  1. 2 QDateEdit with 1 QCalendarWidget ?
    By ouekah in forum Newbie
    Replies: 4
    Last Post: 26th April 2010, 09:24
  2. Replies: 8
    Last Post: 12th February 2010, 02:41
  3. How can I add a QCalendarWidget to a QToolBar?
    By cydside in forum Qt Programming
    Replies: 1
    Last Post: 10th April 2009, 23:06
  4. about QCalendarWidget
    By nifei in forum Qt Programming
    Replies: 2
    Last Post: 9th February 2009, 09:17
  5. 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
  •  
Qt is a trademark of The Qt Company.