Results 1 to 8 of 8

Thread: QWidget inside QGroupbox semi transparent [Qt 4.3.1]

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #4
    Join Date
    Jul 2006
    Posts
    37
    Qt products
    Qt3 Qt4
    Platforms
    Windows
    Thanks
    6

    Default Re: QWidget inside QGroupbox semi transparent [Qt 4.3.1]

    the setWindowOpacity is used for top-level Widget; the aim is to get a standalone widget able to take an opacity different at 0.5 and able to transmit this transparency to all any child widget inside....I attached the picture

    this was obtained with this code to the subclass of QGroupBox
    Qt Code:
    1. void CMyGroupBox::paintEvent(QPaintEvent *)
    2. {
    3. QStylePainter paint(this);
    4. initStyleOption(&option);
    5. paint.setOpacity(0.25);
    6. paint.drawComplexControl(QStyle::CC_GroupBox, option);
    7. }
    To copy to clipboard, switch view to plain text mode 
    Attached Images Attached Images

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.