Home > Mobile >  Cooking chicken to ask qt lable why don't cover the background picture?
Cooking chicken to ask qt lable why don't cover the background picture?

Time:10-02

As large as the background image and the window then lable also transferred to as large as the window, why can not cover the background picture?

CodePudding user response:

Is a small part of the below won't cover the above are also covered

CodePudding user response:

You must put the label is transferred to and pictures as big? If not, you put the picture zoom display is not good

CodePudding user response:

The background color of your display Settings QLabel!
Qt a lot of resources have conductivity, namely child objects of the font, brush and other inherited from the parent object (the default)

CodePudding user response:

You can use:
1. Set the style to use border - image
2. Use setPixmap, the size of the image to adjust and control the same size

CodePudding user response:

Set the background when add a bracket,
Mywidget {
Border - image: : backgroud. JPG
}

CodePudding user response:

Another qlabel default background is transparent, it is necessary to set the style of qlabel,

CodePudding user response:

QLabel {
Background - color: # FFF
}
The label background color to white block background,

CodePudding user response:

Code?

CodePudding user response:

Pixmap. Resize (label - & gt; The size (),/* and stretch */);
  •  Tags:  
  • Qt
  • Related