Results 1 to 2 of 2

Thread: QWinWidget & transparency

  1. #1
    Join Date
    Jun 2010
    Posts
    4
    Qt products
    Qt4
    Platforms
    Windows

    Default QWinWidget & transparency

    Hello,

    I have an application which give a window handle to a DLL. The DLL is in charge to add Qt components.

    The problem is that I want keep the main application theme, so I would like my QWinWidget have a transparent background. But the transparency do not seems to work, it's displayed in black...

    How can I solve this ?

    Thanks

  2. #2
    Join Date
    Jun 2010
    Location
    Salatiga, Indonesia
    Posts
    160
    Thanks
    11
    Thanked 32 Times in 29 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Wiki edits
    1

    Default Re: QWinWidget & transparency

    add this code to your QWinWidget constructor:

    Qt Code:
    1. setAttribute(Qt::WA_TranslucentBackground);
    2. setWindowFlags(Qt::FramelessWindowHint);
    To copy to clipboard, switch view to plain text mode 

Similar Threads

  1. Transparency with QWinWidget
    By martian in forum Qt Programming
    Replies: 7
    Last Post: 28th February 2015, 06:13
  2. Problem using QWinWidget..
    By Muffin in forum Newbie
    Replies: 3
    Last Post: 8th March 2010, 16:02
  3. Deleteing QWinWidget
    By elizabeth.h1 in forum Qt Programming
    Replies: 0
    Last Post: 11th October 2009, 19:26
  4. QWinwidget loses focus
    By salix in forum Qt Programming
    Replies: 0
    Last Post: 16th June 2009, 21:54
  5. QWinWidget and evaluation version
    By KoenTanghe in forum Installation and Deployment
    Replies: 4
    Last Post: 20th November 2007, 09:41

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.