Results 1 to 2 of 2

Thread: Using render inside Paint event on delegates, dont see my widget...

  1. #1
    Join Date
    Sep 2010
    Posts
    654
    Thanks
    56
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default Using render inside Paint event on delegates, dont see my widget...

    I have the next code inside the paint event of a custom delegates:

    Qt Code:
    1. void A_delegates::paint(QPainter* painter, const QStyleOptionViewItem & option, const QModelIndex& index) const
    2. {
    3. QRect the_rect(option.rect);
    4. A_file_chooser file_chooser;
    5. file_chooser.setGeometry(QRect(QPoint(0,0), the_rect.size()));
    6. file_chooser.render(painter,the_rect.topLeft());
    7. }
    To copy to clipboard, switch view to plain text mode 
    A_file_chooser is a customwidget with a label & button. It has tested (promoting it inside a form), I can see it.

    Ok,in the case of the delegate I see my cell empty. (And the delegates, that shows another kind of widgets, works fine)
    Any idea ? Any help would be appreciatted
    Thanks.

  2. #2
    Join Date
    Sep 2010
    Posts
    654
    Thanks
    56
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Using render inside Paint event on delegates, dont see my widget...

    Nobody can help me ?

Similar Threads

  1. Replies: 18
    Last Post: 11th March 2011, 14:21
  2. Why dont see a Custom Widget Promoted ?
    By tonnot in forum Newbie
    Replies: 1
    Last Post: 27th October 2010, 14:24
  3. Replies: 2
    Last Post: 19th August 2010, 03:06
  4. Timer event & paint event, priority
    By Teuniz in forum Qt Programming
    Replies: 0
    Last Post: 2nd February 2010, 14:33
  5. Paint event function in key press event
    By soumya in forum Qt Programming
    Replies: 6
    Last Post: 2nd February 2010, 13:40

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.