×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Jan 2012
    Posts
    5

    Question How to paint into MWindow?

    I have made a class from MWindow.
    I'm trying to use paintevent/QPainter to paint into it.
    However, error is displayed every time paintevent is called:

    QPainter::begin: Widget painting can only begin as a result of a paintEvent
    QPainter::setPen: Painter not active

    Any Ideas? I'm using MWindow since it has openGL enabled and I'm going to need to display multiple sprites. Suggestions?

  2. #2
    Registered User
    Join Date
    Aug 2012
    Posts
    1

    Re: How to paint into MWindow?

    You can draw by using QWidget::paintEvent()

Similar Threads

  1. make QPainter paint as foreground paint
    By srinivas.symbian in forum Qt
    Replies: 0
    Last Post: 2010-12-10, 04:31
  2. How is it possible ? (paint problem)
    By metalcam in forum Mobile Java Media (Graphics & Sounds)
    Replies: 5
    Last Post: 2009-09-16, 14:56
  3. S60 CustomItem paint
    By cosminr in forum Mobile Java General
    Replies: 0
    Last Post: 2009-06-04, 13:27
  4. Canvas and paint()
    By Olimlad in forum Mobile Java General
    Replies: 3
    Last Post: 2008-05-28, 05:19
  5. can't override paint()
    By xnew in forum Mobile Java General
    Replies: 1
    Last Post: 2003-03-19, 08:04

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×