Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User irpx's Avatar
    Join Date
    Jan 2012
    Posts
    5
    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 Dmitriiiy's Avatar
    Join Date
    Aug 2012
    Posts
    1
    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
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved