Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Style dateedit button

    General and Desktop
    2
    2
    3460
    Loading More Posts
    • 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.
    • C
      code-breaker last edited by

      Can someone provide an example of how to set the icon of the dateedit downbutton? The stylesheet docs say 'see spinbox', and that suggests things like this (but they don't work for me):

      @ QDateEdit::down-button {
      subcontrol-origin: border;
      subcontrol-position: bottom right; /* position at bottom right corner */

       width: 16px;
       border-image: url(:/images/spindown.png) 1;
       border-width: 1px;
       border-top-width: 0;
      

      }
      @

      1 Reply Last reply Reply Quote 0
      • J
        JohnToddSr last edited by

        This worked for me, see if it is what you are looking.

        @
        QDateEdit {
        background-color: rgb(255, 255, 255);
        }
        QDateEdit::down-arrow {
        image: url(:/down-arrow.png);
        border: 1px solid #000000;
        background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
        stop: 0 #dedede, stop: 0.5 #434343,
        stop: 0.51 #000000, stop: 1 #656a6d);
        }
        @

        [EDIT: code formatting, please wrap in @-tags, Volker]

        1 Reply Last reply Reply Quote 0
        • First post
          Last post