Results 1 to 3 of 3

Thread: partly transparent dockwidget

  1. #1
    Join Date
    Jun 2010
    Posts
    3

    Default partly transparent dockwidget

    Hi,

    I'm using two Dockwidgets one left one right, each docked. I'd like to have them both docked without filling the whole vertical space. When i change their size it shows only effect when non docked, so i tried to make their background transparent.
    I tried

    • setBackgroundRole(QPalette::NoRole);
    • setWindowOpacity (0.5);
    • setAttribute(Qt::WA_TransparentForMouseEvents);
    • setAttribute(Qt::WA_TranslucentBackground);
    • and the setBrush on the background which just drawed the background black instead of transparent when non docked


    and the setMask code from
    t-qdialog-w-transparent-backgroundl

    but none of it worked

    is there any other possibility to adjust the size of a docked widget or setting its transparent?

  2. #2
    Join Date
    Jan 2006
    Location
    Belgium
    Posts
    1,938
    Thanked 268 Times in 268 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Wiki edits
    20

    Default Re: partly transparent dockwidget

    If you want to set the transparency on a docked widget, this will most likely work but it won't give you anything useful. There's nothing behind the dock widget, so it's useless.

    Changing the dock area size is not supported either. It's like an oversized toolbar.

  3. #3
    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: partly transparent dockwidget

    Actually in some cases it is possible to change the size of a dock widget (look in the docs for details). Although I agree it is difficult to control.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. Replies: 2
    Last Post: 31st May 2010, 11:57
  2. Why the *.qm file only translates application partly?
    By FinderCheng in forum Qt Programming
    Replies: 1
    Last Post: 17th October 2009, 15:04
  3. partly draw in textEdit.
    By gikidy in forum Qt Programming
    Replies: 1
    Last Post: 31st May 2009, 18:43
  4. Non-transparent QWidget on semi-transparent parent
    By EuroElessar in forum Qt Programming
    Replies: 0
    Last Post: 29th August 2008, 16:20
  5. Transparent background on QLabel on transparent QWidget
    By codeslicer in forum Qt Programming
    Replies: 1
    Last Post: 13th February 2008, 02:10

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.