Results 1 to 4 of 4

Thread: Replace all QPushButton's with MyButton

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Replace all QPushButton's with MyButton

    Hi,

    since I want to remove the selected dotted line from all QPushButton's, I have my own class MyButton with QPushButton as base. Fine. I also can replace all instances of QPushButton I use by hand. No Problem so long, but how can I even change the button used in file dialogs etc. (generated from Qt) or in QDialogButtonBox? Any simple possibility?

    Thanks,

    Lykurg

  2. #2
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: Replace all QPushButton's with MyButton

    Yeah, it's too late, forget my question, I am using a style. Ups....

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

    Default Re: Replace all QPushButton's with MyButton

    It's enough to install a style proxy and remove a respective hint responsible for drawing the focus frame. Then it'll work regardless of the style.
    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.


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

    Lykurg (22nd July 2009)

  5. #4
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: Replace all QPushButton's with MyButton

    Quote Originally Posted by wysota View Post
    It's enough to install a style proxy and remove a respective hint responsible for drawing the focus frame. Then it'll work regardless of the style.
    Proxy styles are cool Never have heard of them until now. Thanks.

Similar Threads

  1. Replies: 0
    Last Post: 13th March 2009, 15:38

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.