Results 1 to 2 of 2

Thread: Faking layout of custom editor widget in item delegate

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 Re: Faking layout of custom editor widget in item delegate

    Hi, what you need is QStyle::drawControl() with QStyle::CE_PushButton. Further you need to calculate the rect parameter of the QStyleOption yourself. For that use QStyle::pixelMetric() with QStyle::PM_ButtonMargin, QStyle::PM_DefaultFrameWidth, QStyle::PM_LayoutLeftMargin, ...

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

    mvromer (12th May 2011)

Similar Threads

  1. Item Delegate - Relay a signal to editor widget
    By LynneV in forum Qt Programming
    Replies: 3
    Last Post: 5th July 2010, 16:36
  2. Item Delegate Editor Size
    By QAlex in forum Qt Programming
    Replies: 0
    Last Post: 19th April 2010, 16:43
  3. Item Delegate editor background
    By LynneV in forum Qt Programming
    Replies: 2
    Last Post: 16th March 2010, 21:33
  4. Replies: 2
    Last Post: 12th February 2010, 04:41
  5. Replies: 5
    Last Post: 10th August 2009, 10:50

Tags for this Thread

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.