Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
How to use pic in qss
lwx_me last edited by
I found many software's resouces file were in one picture,like this:
This is a button's different state of press, hover...and they were designed in one picture.
I can use first or last sub pic by this qss:
The background-position of QSS has no equivalent in CSS2 or CSS3. It has no background-position-x background-position-y.
How to use the second or third in QSS??
AFAIK, you can't do it from stylesheets. It doesn't yet implement full CSS. But you can do it easily using QPixmap functions. For eg.
This will display the image with x-offset of 48px on the QLabel.