Qt Forum

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

    Update: Forum Guidelines & Code of Conduct

    Rounded border-top gradient problem

    General and Desktop
    1
    1
    1321
    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.
    • B
      Baldr76 last edited by

      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 Reply Quote 0
      • First post
        Last post