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 Updated to NodeBB v4.3 + New Features

Creating splash form

Scheduled Pinned Locked Moved Solved General and Desktop
5 Posts 3 Posters 444 Views 1 Watching
  • 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.
  • SPlattenS Offline
    SPlattenS Offline
    SPlatten
    wrote on 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

    SPlattenS KroMignonK 2 Replies Last reply
    0
    • SPlattenS 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.

      SPlattenS Offline
      SPlattenS Offline
      SPlatten
      wrote on 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
      • SPlattenS 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.

        KroMignonK Offline
        KroMignonK Offline
        KroMignon
        wrote on 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 last edited by DerReisende
          #4

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

          SPlattenS 1 Reply Last reply
          0
          • D DerReisende

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

            SPlattenS Offline
            SPlattenS Offline
            SPlatten
            wrote on 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

            • Login

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