Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Changing size, color and font size in QDateEdit
Forum Updated to NodeBB v4.3 + New Features

Changing size, color and font size in QDateEdit

Scheduled Pinned Locked Moved Solved General and Desktop
3 Posts 2 Posters 2.5k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G Offline
    G Offline
    gabor53
    wrote on last edited by
    #1

    Hi,
    I have a QDateEdit on a form. The popup is quite small and the text on the first row (month, and year) has almost the same color as the background. Which is the best way to change the calendar size, font size and color in this widget?
    Thank you for your help.

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      One way is to use a style sheet, an example here.

      Hope it helps

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      G 1 Reply Last reply
      0
      • SGaistS SGaist

        Hi,

        One way is to use a style sheet, an example here.

        Hope it helps

        G Offline
        G Offline
        gabor53
        wrote on last edited by
        #3

        @SGaist
        Thank you. I came up with the following that worked:

            QFont calFont("Arial", 14);
            ui->Adoption_dateEdit->calendarWidget ()->setFont (calFont);
        
        1 Reply Last reply
        1

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved