Results 1 to 2 of 2

Thread: if a QPushbutton (or QToolButton) is setFocus enlarge it [like Mac style]

  1. #1
    Join Date
    Mar 2009
    Posts
    2
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default if a QPushbutton (or QToolButton) is setFocus enlarge it [like Mac style]

    Hi to everyone, i would just know if it is possible to create an effect like the "Mac appbar" (or wbar on *unix system)....
    In details, when a QPushbutton (or QToolButton) is setFocus enlarge it.
    I created this effect but only if i click the button, not if i setFocus the button.
    can anyone help me?

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: if a QPushbutton (or QToolButton) is setFocus enlarge it [like Mac style]

    Yes, it's possible. First you need to make sure you do mean focus. If you do then focusInEvent() and focusOutEvent() are for you. If you meant "hover" then you need to enable mouse tracking for your widget and react on enterEvent() and leaveEvent().
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. The following user says thank you to wysota for this useful post:

    mansu (15th March 2009)

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.