Results 1 to 2 of 2

Thread: painter not active

  1. #1
    Join Date
    Jul 2011
    Posts
    81
    Thanks
    8
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Windows Symbian S60 Maemo/MeeGo

    Default painter not active

    i used the code add when i run the program it shows painter is not active
    what is the solution for this error.



    Qt Code:
    1. void mainwindow::paintEvent(QPaintEvent *e)
    2. {
    3.  
    4. QPainter painter(this);
    5. QPen linepen(Qt::red);
    6. linepen.setCapStyle(Qt::RoundCap);
    7. linepen.setWidth(30);
    8. painter.setRenderHint(QPainter::Antialiasing,true);
    9. painter.setPen(linepen);
    10. painter.drawPoint(100,100);
    11.  
    12. }
    To copy to clipboard, switch view to plain text mode 


    waiting response
    Last edited by wysota; 17th August 2011 at 01:17. Reason: missing [code] tags

  2. #2
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: painter not active

    when i run the program it shows painter is not active
    how do you see that the painter is not active? what do you meant "it shows painter is not active"?
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

Similar Threads

  1. Replies: 4
    Last Post: 12th August 2011, 12:20
  2. Painter not active
    By bainedyal in forum Qt Programming
    Replies: 3
    Last Post: 4th August 2011, 10:06
  3. painter->setRasterOp()
    By shruthi in forum Qt Programming
    Replies: 1
    Last Post: 27th May 2010, 07:13
  4. Problem with Painter in Qt4.4.1
    By merry in forum Qt Programming
    Replies: 1
    Last Post: 1st September 2008, 13:47
  5. Painter not active!
    By Caius Aérobus in forum Qt Programming
    Replies: 7
    Last Post: 30th March 2006, 15:44

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.