Results 1 to 3 of 3

Thread: How to dim / blur the background dialog?

  1. #1
    Join Date
    Feb 2009
    Posts
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default How to dim / blur the background dialog?

    I have 2 dialogs:

    1 - the main dialog
    2 - a confirmation dialog (child of the main dialog)

    I want to dim / blur the main dialog (and all the components inside it) when the confirmation dialog come up to catch the focus of the user. How can i do that?

    ger

  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 to dim / blur the background dialog?

    You can make a class as follows -
    just a pseudo code -
    Qt Code:
    1. class BlurDialog
    2. {
    3. QPixmap pixmap; // grab the parent widget into this pixmap, do it in ctor
    4. QDialog confirmationDialog;
    5.  
    6. void paint()
    7. {
    8. // paint the pixmap
    9. }
    10. void show()
    11. {
    12. confirmationDialog.exec();
    13. }
    14. }
    To copy to clipboard, switch view to plain text mode 

    Hope this may work

  3. #3
    Join Date
    Feb 2009
    Location
    Noida, India
    Posts
    517
    Thanks
    21
    Thanked 66 Times in 62 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: How to dim / blur the background dialog?

    also, if u wanna dim, use setOpacity() of QPainter class when drawing around the background

Similar Threads

  1. Dialog is not closing
    By manmohan in forum Newbie
    Replies: 5
    Last Post: 1st December 2008, 17:04
  2. Replies: 9
    Last Post: 13th August 2008, 18:07
  3. Resizing the dialog boxes
    By anju123 in forum Qt Programming
    Replies: 4
    Last Post: 14th September 2007, 10:41
  4. QGraphicsView: Dialog Position Doubt
    By arjunasd in forum Qt Programming
    Replies: 1
    Last Post: 6th August 2007, 17:48
  5. dialog box
    By Bahar in forum Qt Programming
    Replies: 3
    Last Post: 31st January 2006, 14:52

Tags for this Thread

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.