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. How to apply GraphicsEffect for QSplashScreen..?
Qt 6.11 is out! See what's new in the release blog

How to apply GraphicsEffect for QSplashScreen..?

Scheduled Pinned Locked Moved Unsolved General and Desktop
5 Posts 3 Posters 1.4k 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.
  • M Offline
    M Offline
    mounipanditi
    wrote on last edited by
    #1

    Hi,

    I want add a GraphicsEffect for QSplashScreen is it possible to do using

    QSplashScreen *screen = new QSplashScreen;
    screen->setGraphicsEffect(effect);
    

    If it is possible please post a code snippet for me to understand.

    Thanks in Advance,
    Mounika.P

    raven-worxR 1 Reply Last reply
    0
    • M mounipanditi

      Hi,

      I want add a GraphicsEffect for QSplashScreen is it possible to do using

      QSplashScreen *screen = new QSplashScreen;
      screen->setGraphicsEffect(effect);
      

      If it is possible please post a code snippet for me to understand.

      Thanks in Advance,
      Mounika.P

      raven-worxR Offline
      raven-worxR Offline
      raven-worx
      Moderators
      wrote on last edited by
      #2

      @mounipanditi
      what happens or doesn't work with your code?

      --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
      If you have a question please use the forum so others can benefit from the solution in the future

      M 1 Reply Last reply
      0
      • raven-worxR raven-worx

        @mounipanditi
        what happens or doesn't work with your code?

        M Offline
        M Offline
        mounipanditi
        wrote on last edited by
        #3

        @raven-worx

        Thanks for replying, i haven't understood how to write the code that's all.

        raven-worxR D 2 Replies Last reply
        0
        • M mounipanditi

          @raven-worx

          Thanks for replying, i haven't understood how to write the code that's all.

          raven-worxR Offline
          raven-worxR Offline
          raven-worx
          Moderators
          wrote on last edited by
          #4

          @mounipanditi
          there is no more additional magic included than in your code you've posted ;)

          QSplashScreen *screen = new QSplashScreen;
          QGraphicsBlurEffect* effect = new QGraphicsBlurEffect( screen );
          screen->setGraphicsEffect(effect);
          

          --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
          If you have a question please use the forum so others can benefit from the solution in the future

          1 Reply Last reply
          2
          • M mounipanditi

            @raven-worx

            Thanks for replying, i haven't understood how to write the code that's all.

            D Offline
            D Offline
            Devopia53
            wrote on last edited by
            #5

            @mounipanditi

            here simple code:

            #include <QApplication>
            #include <QGraphicsBlurEffect>
            #include <QSplashScreen>
            #include <QTimer>
            
            int main(int argc, char *argv[])
            {
                QApplication a(argc, argv);
            
                QSplashScreen splash(QPixmap(":/your.png"));
                splash.setGraphicsEffect(new QGraphicsBlurEffect);
                splash.show();
                a.processEvents();
            
                QWidget w;
            
                QTimer::singleShot(2000, [&w, &splash]{ w.show(); splash.finish(&w); });
            
                return a.exec();
            }
            
            1 Reply Last reply
            1

            • Login

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