Results 1 to 6 of 6

Thread: QCalendarWidget and text format

  1. #1
    Join Date
    Feb 2010
    Posts
    61
    Thanks
    18
    Qt products
    Qt4
    Platforms
    MacOS X

    Default QCalendarWidget and text format

    Hi,

    is there a way to change the text format of dates that are diplayed in the calendar but are not part of the considered month ?

    More precisely if the calendar currently displays the month May, is it possible to change the text format of the last days of April (top of the calendar) and the first days of June (bottom of the calendar) ?

  2. #2
    Join Date
    Feb 2010
    Posts
    61
    Thanks
    18
    Qt products
    Qt4
    Platforms
    MacOS X

    Default Re: QCalendarWidget and text format

    I'm also ok if I simply get rid of them.

    But after having spent some time in reading the documentation, I still have not found anything yet...

  3. #3
    Join Date
    Feb 2008
    Posts
    491
    Thanks
    12
    Thanked 142 Times in 135 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11

    Default Re: QCalendarWidget and text format

    Take a look at the calendar widget example: link
    If you change the text color, it only affects the current month.

  4. #4
    Join Date
    Feb 2010
    Posts
    61
    Thanks
    18
    Qt products
    Qt4
    Platforms
    MacOS X

    Default Re: QCalendarWidget and text format

    Yes I know that and this is precisely why I'm asking. Here is my problem:

    I have a calendar in which there may be some dates (within a month) that are not selectable. To make it explicit I have changed the color of these dates in the calendar. Now when one looks at the calendar he might see three different colors for a date:

    Dates in black are "available dates" (dates he can click on)
    Dates in light grey are "not available dates" (dates he can click on, but nothing will happen then)

    and finally

    Dates in grey that are not within the current month

    As these last dates might be selectable (or not), I would like them to be displayed in black or light grey and not in grey for obvious visibility reasons.

    A third color adds useless complexity to the user and I would like to avoid that.

    So now the question is: is there away to modify their text format ? If not is it simply possible to not display them ?

  5. #5
    Join Date
    Feb 2010
    Posts
    61
    Thanks
    18
    Qt products
    Qt4
    Platforms
    MacOS X

    Default Re: QCalendarWidget and text format

    I don't know dude

  6. #6
    Join Date
    Oct 2013
    Posts
    1
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: QCalendarWidget and text format

    Have you found a solution for this problem? Or anybody else?

Similar Threads

  1. Replies: 1
    Last Post: 24th April 2010, 15:31
  2. QPlainTextEdit text format question
    By vieraci in forum Qt Programming
    Replies: 0
    Last Post: 4th November 2009, 12:19
  3. QTextEdit current cursor text format
    By afail in forum Qt Programming
    Replies: 0
    Last Post: 13th April 2009, 14:24
  4. Handling mac text format files - support?
    By bnilsson in forum Qt Programming
    Replies: 0
    Last Post: 29th March 2008, 12:10
  5. Rich Text Format
    By Kapil in forum Newbie
    Replies: 1
    Last Post: 4th October 2006, 10:53

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.