Solved [PYTHON 3.8] How to set image background like this in Qt?
-
Background image example how I want it to look
Example:
How I have:
I use QLabel with pixmap where image is chosen from Resource.qrc file. -
- take the QLabel with the pixmap, that you already have.
- create a new Layout
- set the layout to the label myLabel->setLayout(myLayout);
- add all the other widgets you want, Labels, EditBoxes... to that layout
-
Setting label picture to formLayout didn't work out for me or I'm doing something wrong?
self.amdlabel = self.window.findChild(QLabel, "labelAMD") self.formlayout = self.window.findChild(QFormLayout, "formLayout") self.amdlabel.setLayout(self.formlayout)
labelAMD =
formLayout = -
Solved.
Right-click the label and click the "send-to-back" option.