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. Rounded border-top gradient problem

Rounded border-top gradient problem

Scheduled Pinned Locked Moved General and Desktop
1 Posts 1 Posters 1.4k 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.
  • B Offline
    B Offline
    Baldr76
    wrote on last edited by
    #1

    Hi,
    I am using Qt 4.8.4 and I want to make a button, that has gradient on top and bottom borders only. The problem is, where I set the gradient for top or bottom, the gradient is on corner part of border also. My style scheet looks as below. What is wrong with it? How to set color for corner part exclusively?

    @QPushButton, QLineEdit{
    selection-background-color: darkgray;
    background: black;
    border-style: none;
    border-radius: 16px;
    padding: 16px;
    color: rgb(253, 253, 253);
    border-top: 5px solid qlineargradient(spread:reflect, x1:0.5, y1:0.5, x2:1, y2:0.5, stop:0 rgba(59, 59, 59, 255), stop:1 rgba(163, 163, 163, 255));
    border-bottom: 5px solid qlineargradient(spread:reflect, x1:0.5, y1:0.5, x2:1, y2:0.5, stop:0 rgba(59, 59, 59, 255), stop:1 rgba(163, 163, 163, 255));
    border-left: 5px solid rgb(163, 163, 163);
    border-right: 5px solid rgb(163, 163, 163);
    }@

    Thanks in advance for a help.

    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