Results 1 to 11 of 11

Thread: How to paint a widget outside paintEvent()

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Feb 2008
    Posts
    49
    Thanks
    2
    Thanked 4 Times in 1 Post

    Default Re: How to paint a widget outside paintEvent()

    From Qt Assistant, It is say that QWidget::repaint(QRect &rect) will repaints the widget directly by calling paintEvent() immediately, unless updates are disabled or the widget is hidden.

    My list view is Inherits QListView. And I have setUpdatesEnabled to true, of course, My list View is visable on screen.

    But why it doesn't call paintEvent() when I call repaint(QRect) in a time event?

    update(QModelIndex&) is work. But repaint() seems more reliable when I need a immediate painting.

    QWidget is a further base class to QListView, is this a problem?
    Last edited by wesley; 21st February 2008 at 10:45.

Similar Threads

  1. Drawing a widget in QItemDelegate's paint method
    By darkadept in forum Qt Programming
    Replies: 17
    Last Post: 11th August 2009, 05:15
  2. Tricky problem with ARGB widget / UpdateLayeredWindow
    By nooky59 in forum Qt Programming
    Replies: 3
    Last Post: 21st February 2008, 10:35
  3. painting a widget outside a paintEvent
    By jayw710 in forum Qt Programming
    Replies: 1
    Last Post: 25th June 2007, 23:18
  4. paint central widget of a QMainWindow???
    By Shuchi Agrawal in forum Newbie
    Replies: 3
    Last Post: 17th January 2007, 08:02
  5. Replies: 3
    Last Post: 27th November 2006, 09:56

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.