Results 1 to 1 of 1

Thread: QPushButton hightlight effect with QStyleSheet

  1. #1
    Join Date
    Nov 2010
    Posts
    31
    Thanks
    11
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default QPushButton hightlight effect with QStyleSheet

    Hi all,

    What is responsible for highlighting QPushButton when you hover over it with mouse?
    I attached a piece of screenshot from my app, top button is highlighted.
    What is more this effect appears smoothly, looks like some animation with QTimer?

    When I start messing up with QStyleSheet and border keywords this effect goes away, and I can't reproduce it with QStyleSheet.
    Is it ever possible with QStyleSheet? I was trying box-shadow but with no luck - I can't observer any effect.

    What I'm trying to achieve is borders that imitate 3D button, they change when I click on button, and also highlight effect when button has focus or mouse hovers over it, how to do it ?
    Should I play with QStyle instead of QStyleSheet?
    And is it true that QStyleSheet is compiled at run time and hence app can slow down ?
    I'm using Qt 4.8.1 on Linux

    best regards
    Marek
    Attached Images Attached Images

Similar Threads

  1. Replies: 5
    Last Post: 19th March 2011, 16:44
  2. Animation effect of gif in QPushButton
    By santosh.kumar in forum Qt Programming
    Replies: 6
    Last Post: 3rd March 2011, 11:14
  3. Removing pressed effect from a QPushButton
    By Luc4 in forum Qt Programming
    Replies: 3
    Last Post: 14th August 2010, 11:43
  4. Hightlight not lost
    By wirasto in forum Qt Programming
    Replies: 0
    Last Post: 5th August 2010, 13:16
  5. QPushButton fade effect without animation
    By Kostanev in forum Qt Programming
    Replies: 11
    Last Post: 12th November 2008, 09:46

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.