Hey man, thanks for the info! Learned a "trick" more again
Now I'm only searching for a way to paint only behind the text. I thought, that I could use a gradient (can I draw rounded reactangles this way?), which leaves the image area free and starts somewhere in the middle of the button. But all attempts until now don't work![]()
Do you mean the background? Read about background in Qt style sheetsNow I'm only searching for a way to paint only behind the text.
Correct ... I mean the background. Have already read the stylesheet docu, but haven't found a way to draw only half the background with a Gradient and keep the other half part transparent or as it is.
than write it next time....Then use a gradient which is from 0.0 to 0.5 transparent and for 0.500000000000000000000000000000000000000000000000 000000000000000000000001 to 1.0 make your colours. How to use gradient has BalaQt written and all that are wounderfull explained in the docus.Have already read the stylesheet docu, but haven't found a way to draw only half the background with a Gradient and keep the other half part transparent or as it is.
Hi Lykurg ... why so aggressive? You helped me with the first part of the question (the hint to the qproperty was helpful indeed). For the second part (as noted ... and written) in my initial question I will try the gradient (which I already know).
hi
for setting a image using stylesheet
Qt Code:
t->setStyleSheet("background-image: url(computer.gif)");To copy to clipboard, switch view to plain text mode
for setting a transparent in a stylesheet
Qt Code:
background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #6666FF, stop: 0.7 #99CCFF , stop: 1 #CCCCFF);To copy to clipboard, switch view to plain text mode
work it around, u may find a solution. (im not sure ,it helps or not)
hope it helps
Bala
Bookmarks