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. Style dateedit button

Style dateedit button

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 3.6k Views
  • 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 Offline
    C Offline
    code-breaker
    wrote on last edited by
    #1

    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
    0
    • J Offline
      J Offline
      JohnToddSr
      wrote on last edited by
      #2

      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
      0

      • Login

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