Results 1 to 3 of 3

Thread: How can I make the children widget visible when the parent mainwindow transparent?

  1. #1
    Join Date
    Aug 2008
    Posts
    16
    Thanks
    3

    Default How can I make the children widget visible when the parent mainwindow transparent?

    Hi all:
    I created a mainwindow(QMainWindow) and attached a listwidget(QListWidget) to it , I use QWidget::setMask() to make the mainwindow transparent , but the listwidget is transparent too . That isn't what I want .
    So how can I make the listwidget visible when the mainwindow is transparent ?
    I don't use QWidget::setWindowOpacity()because I develop this application on WIN_CE with a Qt-4.4.0 , this OS doesn't support this method !

    here is my code:
    Qt Code:
    1. ui.setupUi(this);
    2.  
    3. QSize Size = size();
    4. QPixmap maskPix(Size);
    5. maskPix.fill(Qt::transparent);
    6. setMask(maskPix.mask());
    To copy to clipboard, switch view to plain text mode 

    Thanks for you suggestion.

  2. #2
    Join Date
    Oct 2006
    Location
    New Delhi, India
    Posts
    2,467
    Thanks
    8
    Thanked 334 Times in 317 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: How can I make the children widget visible when the parent mainwindow transparent

    Does Win CE version of Qt support Style sheets ?
    If yes, u may use the style sheet

  3. #3
    Join Date
    Aug 2008
    Posts
    16
    Thanks
    3

    Default Re: How can I make the children widget visible when the parent mainwindow transparent

    Quote Originally Posted by aamer4yu View Post
    Does Win CE version of Qt support Style sheets ?
    If yes, u may use the style sheet
    I used the setStyleSheet() but it can't make the mainwindow transparent , If I set the alpha's value 0 , the mainwindow's background-color changed black .

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.