1
I’m starting as an IT and I found this perfect library that is pyqt5, but there are some things that I can’t fully do because the method I use seems to not work. Instead of creating a screen just by code, or creating in Qtdesigner and passing it to Python, I use both at the same time, I edit in Qtdesigner and import by "uic.Loadui()". I wanted to put an image like Background on a full screen, but when I put the image in the centralwidget, it either gets too big, or it gets cropped, plus it doesn’t just look like wallpaper but for all the things I put in there, a label, a Qlineedit etc. how can I make it resize itself to full screen on a PC and not stay on all objects?
an example test:
from PyQt5 import uic,QtWidgets
#app
app=QtWidgets.QApplication([])
Tela_qualquer = uic.loadUi('teste.ui')
Tela_qualquer.setStyleSheet("background-image: url(df.jpg); background-repeat: no-repeat; background-position: center")
Tela_qualquer.show()
app.exec()
The screen with a button and a Qlabel and the photo cropped: