Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Creating splash form
Forum Update on Monday, May 27th 2025

Creating splash form

Scheduled Pinned Locked Moved Solved General and Desktop
5 Posts 3 Posters 408 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    SPlatten
    wrote on 27 Apr 2021, 11:00 last edited by SPlatten
    #1

    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.

    Kind Regards,
    Sy

    S K 2 Replies Last reply 27 Apr 2021, 11:05
    0
    • S SPlatten
      27 Apr 2021, 11:00

      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.

      S Offline
      S Offline
      SPlatten
      wrote on 27 Apr 2021, 11:05 last edited by
      #2

      @SPlatten , Done, changed the control from QWidget to QLabel, removed text and selected resource using pixmap option.

      Kind Regards,
      Sy

      1 Reply Last reply
      0
      • S SPlatten
        27 Apr 2021, 11:00

        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.

        K Offline
        K Offline
        KroMignon
        wrote on 27 Apr 2021, 11:06 last edited by
        #3

        @SPlatten said in Creating splash form:

        background-image: SPLASH_IMG

        I think this should be: background-image: url(:/SPLASH_IMG);

        It is an old maxim of mine that when you have excluded the impossible, whatever remains, however improbable, must be the truth. (Sherlock Holmes)

        1 Reply Last reply
        0
        • D Offline
          D Offline
          DerReisende
          wrote on 27 Apr 2021, 13:58 last edited by DerReisende
          #4

          If you want to create a splash screen wouldn‘t it be better to use QSplashScreen?

          S 1 Reply Last reply 27 Apr 2021, 14:01
          0
          • D DerReisende
            27 Apr 2021, 13:58

            If you want to create a splash screen wouldn‘t it be better to use QSplashScreen?

            S Offline
            S Offline
            SPlatten
            wrote on 27 Apr 2021, 14:01 last edited by
            #5

            @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.

            Kind Regards,
            Sy

            1 Reply Last reply
            0

            1/5

            27 Apr 2021, 11:00

            • Login

            • Login or register to search.
            1 out of 5
            • First post
              1/5
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved