Results 1 to 2 of 2

Thread: QT's style sheet does not work properly on Mac OS X

  1. #1
    Join Date
    Jul 2007
    Posts
    90
    Thanks
    2
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default QT's style sheet does not work properly on Mac OS X

    Hi all

    I am trying to customize the QComboBox or QSpinBox using Qt's style sheet.
    Here is the code i have written for customizing the QComboBox
    Qt Code:
    1. QComboBox *pComboBox = new QComboBox();
    2. pComboBox->setStyleSheet( "QComboBox{ font: bold; padding: 0px 6px; border-image: url(borderimage);} QComboBox::drop-down { width:" + QString::number(14) + "px; height:" + QString::number(14) + "; subcontrol-origin: padding; subcontrol-position: center right; image: url(dropdownimage); left:-5px;} QComboBox::drop-down:hover {image: url(dropdownhoverimage);} QComboBox::drop-down:on {image: url(dropdownonimage); } ");
    To copy to clipboard, switch view to plain text mode 

    But the combox bottom border is clipped slightly. It seems that there is issue in style sheet on Mac os x.

    Any help.

    regards,
    ~Sanjay

  2. #2
    Join Date
    Jul 2007
    Posts
    90
    Thanks
    2
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: QT's style sheet does not work properly on Mac OS X

    Here is the screenshot of the customized QComboBox. Observe that bottom border has been less thicker than top border.
    Attached Images Attached Images

Similar Threads

  1. QTabWidget transparent background problem
    By destroyar0 in forum Qt Programming
    Replies: 10
    Last Post: 25th June 2009, 13:19
  2. How to set Style sheet for QCalendarWidget?
    By nifei in forum Qt Programming
    Replies: 1
    Last Post: 16th February 2009, 23:36
  3. QMenu style sheet: works in dev env, breaks in release
    By JimDaniel in forum Qt Programming
    Replies: 1
    Last Post: 6th October 2008, 20:18
  4. QToolButton and Style sheet
    By desch in forum Qt Programming
    Replies: 8
    Last Post: 1st December 2007, 09:38
  5. Qt 4.3 Style sheet, new features
    By Angelo Moriconi in forum Qt Programming
    Replies: 2
    Last Post: 12th June 2007, 16:22

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.