How to setting the background-image
-
transition band how to achieve !thank you everyone!
!http://www.qtcn.org/bbs/attachment/Mon_1308/26_124672_738763b96fb3541.jpg(myEffect)!
!http://www.qtcn.org/bbs/attachment/Mon_1308/26_124672_0dfa083c0239ddf.jpg(the want to effect)! -
Hi,
What code do you use? What settings?
The mistake often made is that people use the
background image in the stylesheet, but you should use the border-image option. Then the image will be resized with the widget size.
@
// Setup the border-image as the selected image
QString strStyle("");strStyle.clear(); strStyle.append("QFrame{border-image: url("); strStyle.append(strPicture); // = ":/BackGroundPictures/BackGroundPictures/M01DrukSensor.PNG" strStyle.append(");"); strStyle.append("}"); pFrame->setStyleSheet(strStyle);
@
-
thank you, but your way is not my want to effect!
my view is the image no resize!use other color fill the widget!
how to use the "paintevent" to achieve this effect!
I want to second effect!
[quote author="Jeroentje@home" date="1376649188"]Hi,
What code do you use? What settings?
The mistake often made is that people use the
background image in the stylesheet, but you should use the border-image option. Then the image will be resized with the widget size.
@
// Setup the border-image as the selected image
QString strStyle("");strStyle.clear(); strStyle.append("QFrame{border-image: url("); strStyle.append(strPicture); // = ":/BackGroundPictures/BackGroundPictures/M01DrukSensor.PNG" strStyle.append(");"); strStyle.append("}"); pFrame->setStyleSheet(strStyle);
@[/quote]