Results 1 to 7 of 7

Thread: QSplashScreen transparncy

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Dec 2008
    Location
    PUNE (INDIA)
    Posts
    49
    Thanks
    11
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default QSplashScreen transparncy

    Hi all Expert,
    I am designing a custom SplashScreen , I have set a pixmap to it which has some transparent part in it . I have loaded a new image to the splashScreen in its drawContents( ) function to certain location.
    But I am not able to set the splachscreen fully transparent so that i can see my desktopImage through it.I had tried several options mentioned in the forum but unfortunately that did'nt work.
    Please let me know where i am going wrong.
    .h file
    class CustomSplashScreenublic QSplashScreen
    {
    Q_OBJECT
    public:
    CustomSplashScreen(const QPixmap& pixmap);
    ~CustomSplashScreen();
    protected:
    virtual void drawContents(QPainter *painter);
    void paintEvent(QPaintEvent *event);
    };
    .cpp file
    CustomSplashScreen::CustomSplashScreen(const QPixmap& pixmap)
    {
    QSplashScreen::setPixmap(pixmap);
    }

    CustomSplashScreen::~CustomSplashScreen()
    {
    }

    void CustomSplashScreen::drawContents(QPainter *painter)
    {
    QImage image("://images/3.png");
    painter->drawImage(-2,-2,image);
    }

    void CustomSplashScreen:aintEvent(QPaintEvent *event)
    {
    QPainter *painter = new QPainter(this);
    setAttribute(Qt::WA_NoSystemBackground);
    }
    I want the result like final_Result_splashScreen.png
    Attached Images Attached Images
    Last edited by vajindarladdad; 12th October 2009 at 11:53.
    Thanks & Regards ,

    Vajindar Laddad .
    Trainee Developer.
    (INDIA).
    91+9325014248

Similar Threads

  1. QSplashScreen question
    By graciano in forum Qt Programming
    Replies: 7
    Last Post: 14th July 2009, 12:39
  2. QSplashscreen, Qt.WindowStaysOnTopHint And Title Bar
    By Kel Solaar in forum Qt Programming
    Replies: 2
    Last Post: 18th June 2009, 21:43
  3. QSplashScreen loading icon
    By talk2amulya in forum Qt Programming
    Replies: 7
    Last Post: 16th February 2009, 09:46
  4. Stylesheets on QSplashScreen
    By GuS in forum Qt Programming
    Replies: 0
    Last Post: 16th July 2008, 14:50
  5. QSplashScreen Weirdness
    By mclark in forum Qt Programming
    Replies: 11
    Last Post: 19th November 2007, 06:49

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.