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. QCalendarWidget background

QCalendarWidget background

Scheduled Pinned Locked Moved Unsolved General and Desktop
6 Posts 3 Posters 2.2k Views 1 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.
  • Y Offline
    Y Offline
    yunjungao
    wrote on last edited by
    #1

    when i set QCalendarWidget background transparent,but the center QCalendarView‘s background become black,like this:0_1554167497238_TIM截图20190402091038.png
    so how i can set QCalendarWidget whole background transparent?

    1 Reply Last reply
    0
    • Christian EhrlicherC Offline
      Christian EhrlicherC Offline
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote on last edited by
      #2

      How do you set the transparency? With style sheets or with the help of window opacity?

      Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
      Visit the Qt Academy at https://academy.qt.io/catalog

      1 Reply Last reply
      0
      • Y Offline
        Y Offline
        yunjungao
        wrote on last edited by
        #3

        with style sheets,like this :
        QCalendarWidget QTableView{
        background-color: transparent;
        }

        jsulmJ 1 Reply Last reply
        0
        • Y yunjungao

          with style sheets,like this :
          QCalendarWidget QTableView{
          background-color: transparent;
          }

          jsulmJ Offline
          jsulmJ Offline
          jsulm
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @yunjungao Does this help https://forum.qt.io/topic/75661/stylesheet-to-calender-popup/5 ?

          https://forum.qt.io/topic/113070/qt-code-of-conduct

          Y 1 Reply Last reply
          0
          • jsulmJ jsulm

            @yunjungao Does this help https://forum.qt.io/topic/75661/stylesheet-to-calender-popup/5 ?

            Y Offline
            Y Offline
            yunjungao
            wrote on last edited by yunjungao
            #5

            @jsulm thanks your reply, I have read this example,and when i change background-color of calendarWidget , different colors like blue, red result is ok,but if i Change to transparency, Its background-color become black,See figure above

            jsulmJ 1 Reply Last reply
            0
            • Y yunjungao

              @jsulm thanks your reply, I have read this example,and when i change background-color of calendarWidget , different colors like blue, red result is ok,but if i Change to transparency, Its background-color become black,See figure above

              jsulmJ Offline
              jsulmJ Offline
              jsulm
              Lifetime Qt Champion
              wrote on last edited by
              #6

              @yunjungao Not sure, but maybe you need to set transparency on the parent of calendar widget as well?

              https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              0

              • Login

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