Results 1 to 2 of 2

Thread: QStyledItemDelegate vs QStyleOption vs OSX

  1. #1
    Join Date
    May 2011
    Posts
    132
    Thanks
    14
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: QStyledItemDelegate vs QStyleOption vs OSX

    Some reason the QStyleOptionButton is not painted on OSX, works great on linux

    Qt Code:
    1.  
    2. //QListView *view = qobject_cast<QListView*>(parent());
    3. //view->style()->drawControl(QStyle::CE_PushButton, &button, painter);
    4.  
    5. QApplication::style()->drawControl(QStyle::CE_PushButton, &button, painter);
    To copy to clipboard, switch view to plain text mode 

    Any ideas ?
    Thanks.


    Added after 1 15 minutes:


    Using QStyle::CE_CheckBox works, but it draws the checkbox, I checked in Qt of 4.7.3 and 4.8.1.
    Last edited by migel; 19th June 2012 at 20:16.

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

    Default Re: QStyledItemDelegate vs QStyleOption vs OSX

    How did you initialize the QStyleOptionButton instance?
    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.


Similar Threads

  1. QTreeView & QStyledItemDelegate
    By mentalmushroom in forum Qt Programming
    Replies: 0
    Last Post: 29th September 2011, 08:57
  2. Custom QStyledItemDelegate
    By Berryblue031 in forum Qt Programming
    Replies: 0
    Last Post: 2nd March 2011, 11:32
  3. QStyledItemDelegate and QStyle::State_MouseOver
    By moti.lahiani in forum Qt Programming
    Replies: 0
    Last Post: 19th January 2011, 07:36
  4. QStyledItemDelegate and editor pointer
    By Nero in forum Qt Programming
    Replies: 10
    Last Post: 20th September 2010, 19:42
  5. QStandardItem, QStyledItemDelegate, and QWebView
    By enlightened_j in forum Newbie
    Replies: 1
    Last Post: 16th August 2010, 09:44

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.