Results 1 to 4 of 4

Thread: Semi transparent QDialog

  1. #1
    Join Date
    Jun 2006
    Posts
    5
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Question Semi transparent QDialog

    Hi I want a QDialog which shows the contents of its parent a main window.
    Itried setOpacity() , setWindowOpacity(), auto backgorund false,
    But It didnt work.

    Some body help
    Im using Qt 4.2.1 and Fedora 5

    Thanks

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Semi transparent QDialog

    Does your window manager support compositions?

  3. #3
    Join Date
    Jan 2006
    Location
    Norway
    Posts
    10
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Semi transparent QDialog

    Hello,

    I'm not sure if I understand you correctly. But you could set widget attribute to
    WA_NoSystemBackground like this:
    dialog->setAttribute(Qt::WA_NoSystemBackground);

    In that way you'll see through the dialog and to the main window in the background.

  4. #4
    Join Date
    Feb 2006
    Location
    Romania
    Posts
    2,744
    Thanks
    8
    Thanked 541 Times in 521 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Semi transparent QDialog

    Desktop compositions are supported on X11( extensions need to be enabled ), OS X by default, and Vista only when enabling Aero.

    Since you're using Linux, make sure you have enabled the composition in X11.
    In xorg.conf add:
    Qt Code:
    1. Section "Extensions"
    2. Option "Composite" "Enable"
    3. EndSection
    To copy to clipboard, switch view to plain text mode 

    Regards

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.