Results 1 to 11 of 11

Thread: How to paint a widget outside paintEvent()

Threaded 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

    Question How to paint a widget outside paintEvent()

    Hello, can you do me a favor?

    Platform: Qtopia 4.3.2

    question: paint a widget outside paintEvent() or paint()

    problem detail:
    I had implemented a custom list view(Inherits QListView), of course , a item delegate to paint each item the list view has.

    now, when the text of the focus index has exceeded the text rectangle, I should scroll the text.

    my thought is using a timer to scroll text, 2 or 3 characters every time the time-out event happen, but how can i paint the widget now?

    the item delegate just can be paint inside paint(), and delegate->paint() just can be called from list view's paintEvent(). that is the real problem. ~_~

    may be i can ask Qt to repaint it by using update() or repaint(). But how can i pass a flag or parameter to paintEvent() that I just want to scroll text, not paint a entireness widget.



    ^_^, Any one have the good solution for this? thank you very much.
    Last edited by wesley; 16th February 2008 at 14:15.

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.