Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
[PYTHON 3.8] How to set image background like this in Qt?
Background image example how I want it to look
How I have:
I use QLabel with pixmap where image is chosen from Resource.qrc file.
gde23 last edited by gde23
- 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)
Right-click the label and click the "send-to-back" option.