Results 1 to 5 of 5

Thread: setFlat(true) and QPushButtton:hover

  1. #1
    Join Date
    May 2010
    Posts
    39
    Thanks
    11
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4

    Default setFlat(true) and QPushButtton:hover

    Buttons[i]->setFlat(true);
    Buttons[i]->setStyleSheet("QPushButton:hover{background: red;}");

    it works well without "Buttons[i]->setFlat(true);".
    but how to do with this?

  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: setFlat(true) and QPushButtton:hover

    You have to add
    css Code:
    1. border: 0;
    To copy to clipboard, switch view to plain text mode 
    to activate "background" for your button.

  3. #3
    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: setFlat(true) and QPushButtton:hover

    Quote Originally Posted by Lykurg View Post
    You have to add
    css Code:
    1. border: 0;
    To copy to clipboard, switch view to plain text mode 
    to activate "background" for your button.
    Just curious.. is it documented ?

  4. #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: setFlat(true) and QPushButtton:hover

    Quote Originally Posted by aamer4yu View Post
    Just curious.. is it documented ?
    No, not that I am aware of. It's originated by my ingenious nature
    (Just figured it out some day while "playing" around...)

  5. #5
    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: setFlat(true) and QPushButtton:hover

    (Just figured it out some day while "playing" around...)
    Are there more such play docs
    If there are many such,there should be a wiki section of such findings while playing around

Similar Threads

  1. QTabWidget and .setTabsClosable(True)
    By prof.ebral in forum Newbie
    Replies: 3
    Last Post: 26th February 2010, 04:36
  2. True virtual model-view ?
    By TorAn in forum Qt Programming
    Replies: 2
    Last Post: 3rd December 2009, 12:12
  3. Qt for S60, compiler warning regarding TRUE/FALSE
    By Archimedes in forum Qt for Embedded and Mobile
    Replies: 0
    Last Post: 22nd October 2009, 14:09
  4. why Qt's forever macro is for(;;) rather than while(true).
    By babu198649 in forum General Programming
    Replies: 1
    Last Post: 13th June 2009, 14:21
  5. Is this true, Qt lgpl license..
    By tgreaves in forum General Discussion
    Replies: 5
    Last Post: 8th March 2009, 11:34

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.