Results 1 to 4 of 4

Thread: How to make a mainwindow as earlier after making it transparent

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    May 2011
    Posts
    120
    Thanks
    9
    Qt products
    Qt3 Qt4
    Platforms
    Windows

    Default How to make a mainwindow as earlier after making it transparent

    Hi all

    I want to make my background transparent when clicked a button and after clicking on another button i want to make background as it was earlier. I try

    Qt Code:
    1. this->setStyleSheet("background:transparent");
    2. this->setAttribute(Qt::WA_TranslucentBackground, true);
    3. this->setWindowFlags(Qt::FramelessWindowHint);
    To copy to clipboard, switch view to plain text mode 
    and
    Qt Code:
    1. this->setStyleSheet("background:transparent");
    2. this->setAttribute(Qt::WA_TranslucentBackground, false);
    3. this->setWindowFlags(Qt::FramelessWindowHint);
    To copy to clipboard, switch view to plain text mode 
    but not getting desired result.
    What i am doing here.
    Waiting for yours response.
    Last edited by Niamita; 9th January 2012 at 07:29.

Similar Threads

  1. Replies: 3
    Last Post: 18th July 2019, 10:25
  2. How to make overlapping widgets opaque ?
    By ada10 in forum Newbie
    Replies: 3
    Last Post: 9th September 2010, 10:06
  3. Replies: 0
    Last Post: 25th August 2010, 17:39
  4. Replies: 2
    Last Post: 19th August 2008, 09:46
  5. Making some part of window transparent
    By yogeshm02 in forum Qt Programming
    Replies: 1
    Last Post: 27th March 2006, 20:36

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.