Solved Creating splash form
-
I have an image which I have added to the resource file with an alias. I am trying to create a splash form for the application and reference the resource file, how do I do this?
My splash form contains a QWidget that I have set to the same size as the image, I know I can use CSS in the widget style property, is there a way to reference the resource using its alias in the CSS?
Resource alias is SPLASH_IMG, I've tried setting the styleSheet for the widget to:
background-image: SPLASH_IMG
It didn't work.
-
@SPlatten , Done, changed the control from QWidget to QLabel, removed text and selected resource using pixmap option.
-
@SPlatten , Done, changed the control from QWidget to QLabel, removed text and selected resource using pixmap option.
-
@SPlatten said in Creating splash form:
background-image: SPLASH_IMG
I think this should be:
background-image: url(:/SPLASH_IMG);
-
If you want to create a splash screen wouldn‘t it be better to use QSplashScreen?
-
@DerReisende , I started down that road, then found another reason I took an about turn and am doing it this way, sorry I just cannot remember the reason why.