Results 1 to 3 of 3

Thread: How to set QListView Opacity ,setWindowOpacity dosn’t work

  1. #1
    Join Date
    May 2009
    Posts
    83

    Default How to set QListView Opacity ,setWindowOpacity dosn’t work

    Hi
    im trying to set opacity to QListView , that sits on QDialog
    i mange to set the QDialog transperant with setting the
    :Qt::WA_TranslucentBackground = true
    but the QListView doesn't become transparent with i set the
    setWindowOpacity to 1 or 0

  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: How to set QListView Opacity ,setWindowOpacity dosn’t work

    try this:

    Qt Code:
    1. QPalette pal = listView->palette();
    2. pal.setColor(QPalette::Base, Qt::transparent);
    3. listView->setPalette(pal);
    To copy to clipboard, switch view to plain text mode 

  3. #3
    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: How to set QListView Opacity ,setWindowOpacity dosn�t work

    try this:

    Qt Code:
    1. QPalette pal = listView->palette();
    2. pal.setColor(QPalette::Base, Qt::transparent);
    3. listView->setPalette(pal);
    To copy to clipboard, switch view to plain text mode 

Similar Threads

  1. QIODevice dosn't work inside slot
    By s410i in forum Qt Programming
    Replies: 1
    Last Post: 1st August 2009, 11:10
  2. Replies: 4
    Last Post: 11th January 2008, 12:18
  3. make--dosn't generate an .exe file
    By Nora in forum Installation and Deployment
    Replies: 11
    Last Post: 12th November 2007, 01:26
  4. setWindowOpacity doesn't work!
    By nupul in forum Qt Programming
    Replies: 5
    Last Post: 21st April 2006, 18:28
  5. [QT3] QListView and Key_Delete - doesn't work?
    By InZone in forum Qt Programming
    Replies: 2
    Last Post: 26th January 2006, 14:49

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.