Quantcast
Channel: Jobs
Viewing all articles
Browse latest Browse all 18427

StyleSheet render correctly in desinger but not in working apps

$
0
0
Hi all, i wrote some StyleSheet lines to render two QPushButtons rounded: QPushButton{   background-color:qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,stop: 0 #f6f7fa, stop: 1 #dadbde);      border: 2px outset grey;   border-style: solid;   border-width:1px;   border-radius:5px;   border-color: black;   max-width:10px;   max-height:10px;   min-width:10px;   min-height:10px; }   QPushButton:pressed{     border-radius: 5px;     border: 2px outset grey;  background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,stop: 0, #dadbde, stop: 1 #c5c6c9);   max-width:10px;   max-height:10px;   min-width:10px;   min-height:10px; } as I’m using them into a designer’s Form I can see the preview and it looks nice: but when I compile and run my app, QPushButtons look squared instead of rounded: I tried to add into form class the stylesheet statements programmatically instead of using “change styleSheet” in designer, but nothing happens and I get the same squared buttons. After form creation I added this (FindForm) form to final Dialog promoting a QWidget that works as placeholder. And I can’t change stylesheet from that point, as FindForm ui is a private variable. Where is my mistake? Thanks in advance for any help. Al

Viewing all articles
Browse latest Browse all 18427

Trending Articles