Results 1 to 5 of 5

Thread: Why blur effect on only one widget at a time?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Sep 2008
    Posts
    58
    Qt products
    Qt/Embedded
    Platforms
    Unix/X11
    Thanks
    11

    Default Re: Why blur effect on only one widget at a time?

    Quote Originally Posted by aamer4yu View Post
    From the docs -
    Or alternatively you can apply the effect to the parent item.
    I have applied blur effect ot parent widget, my parent widget contains 18 pushbuttons and 1 label.
    I am able to manage blur on all the pushbuttons, but this makes pushbutton slower. ( we can differential click on pushbutton with blur applied to parent widget and without blur effect.)

    I am using on Linux platform with ARM9 400Mhz CPU.

    Is Graphics effect eat more CPU that degrads overall performance, or its a property of Graphics effect??

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

    Default Re: Why blur effect on only one widget at a time?

    ui->pushbutton_1->setGraphicsEffect(blur);
    ui->pushbutton_2->setGraphicsEffect(blur);
    ui->pushbutton_3->setGraphicsEffect(blur);
    ui->pushbutton_4->setGraphicsEffect(blur);
    ui->pushbutton_5->setGraphicsEffect(blur);

    it will show blur effect only on last pushbutton i.e. pushbutton_5 .

    now if I do,
    ui->pushbutton_1->setGraphicsEffect(blur);
    ui->pushbutton_4->setGraphicsEffect(blur);
    ui->pushbutton_5->setGraphicsEffect(blur);
    ui->pushbutton_2->setGraphicsEffect(blur);
    ui->pushbutton_3->setGraphicsEffect(blur);

    it will show blur effect only on pushbutton_3
    From above doesnt seem you are applying effect only to parent item !

  3. #3
    Join Date
    Sep 2008
    Posts
    58
    Qt products
    Qt/Embedded
    Platforms
    Unix/X11
    Thanks
    11

    Default Re: Why blur effect on only one widget at a time?

    Sorry I just forget to put code.

    Qt Code:
    1. this->setGraphicsEffect(blur); // instead of ui->pushbutton_5->setGraphicsEffect(blur).
    To copy to clipboard, switch view to plain text mode 

Similar Threads

  1. Replies: 2
    Last Post: 11th February 2010, 08:45
  2. youtube fullscreen effect for a widget
    By cyrfer in forum Qt Programming
    Replies: 2
    Last Post: 5th January 2010, 13:57
  3. Replies: 2
    Last Post: 11th November 2009, 09:03
  4. How to dim / blur the background dialog?
    By german@it-missions.com in forum Qt Programming
    Replies: 2
    Last Post: 18th February 2009, 08:40
  5. argb windows and blur
    By kernel_panic in forum Qt Programming
    Replies: 6
    Last Post: 13th August 2007, 17: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
  •  
Qt is a trademark of The Qt Company.