Results 1 to 1 of 1

Thread: QButton losses round edges when it has focus under Fedora Linux

  1. #1
    Join Date
    Nov 2010
    Posts
    122
    Thanks
    62
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Smile QButton losses round edges when it has focus under Fedora Linux

    I have a highly stylized application based on widgets in C++. Under Windows, when a QPushButton is selected and has the focus, while the gradient changes to an orange, the edges of the button remain round. Under Linux, when the button is selected, the gradient color is correct, but the button losses it's roundness.

    The style sheet for the button is as follows:

    css Code:
    1. QPushButton
    2. {
    3. color: rgb(35, 35, 35);
    4. border: 1px solid rgb(75, 75, 75);
    5. border-radius: 6px;
    6. background-color: qlineargradient(spread:reflect, x1:0.500299, y1:0, x2:0.5, y2:0.66, stop:0 rgba(240, 240, 240, 255), stop:1 rgba(120, 120, 120, 255));
    7. }
    8.  
    9. QPushButton:pressed, QPushButton:checked, QPushButton:selected
    10. {
    11. background-color:qlineargradient(spread:reflect, x1:0.5, y1:0, x2:0.5, y2:0.685, stop:0.0170455 rgba(255, 173, 19, 255), stop:0.988701 rgba(223, 93, 0, 255))
    12. }
    To copy to clipboard, switch view to plain text mode 

    If have the following general style setting in the application, attempting to have some
    uniformity between Linux and Windows.

    Qt Code:
    1. // Set style to Windows so that under Ubuntu Linux GTK+ style, group boxes
    2. // will have borders, and the default button will not have a red hue. This
    3. // will cause the Linux build to look more consistently like the Windows.
    4. qApp->setStyle(new QWindowsStyle);
    To copy to clipboard, switch view to plain text mode 
    Last edited by wysota; 10th February 2011 at 20:00.

  2. The following user says thank you to bob2oneil for this useful post:

    sedi (11th February 2012)

Similar Threads

  1. Need help in installing Qt-embedded 4.5(on linux fedora 8)
    By rishiraj in forum Installation and Deployment
    Replies: 2
    Last Post: 24th March 2009, 08:10
  2. QPainter & QPrinter on linux (fedora 7)
    By wbt_ph in forum Qt Programming
    Replies: 4
    Last Post: 20th October 2007, 15:37
  3. Round ended edges
    By merry in forum Qt Programming
    Replies: 5
    Last Post: 9th August 2007, 22:31
  4. Installing both qt3 and qt4 on linux ( Fedora Core )
    By vermarajeev in forum Installation and Deployment
    Replies: 3
    Last Post: 10th May 2007, 17:21
  5. Unable to install Qt 4.2.1 on LInux Fedora
    By shyam prasad in forum Installation and Deployment
    Replies: 1
    Last Post: 12th January 2007, 14:15

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.