Creating splash form
-
wrote on 27 Apr 2021, 11:00 last edited by SPlatten
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.
-
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.
-
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.
wrote on 27 Apr 2021, 11:06 last edited by@SPlatten said in Creating splash form:
background-image: SPLASH_IMG
I think this should be:
background-image: url(:/SPLASH_IMG);
-
wrote on 27 Apr 2021, 13:58 last edited by DerReisende
If you want to create a splash screen wouldn‘t it be better to use QSplashScreen?
-
If you want to create a splash screen wouldn‘t it be better to use QSplashScreen?
wrote on 27 Apr 2021, 14:01 last edited by@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.
1/5