Results 1 to 2 of 2

Thread: painter not active

Threaded View

Previous Post Previous Post   Next Post Next Post
  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

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
  •  
Qt is a trademark of The Qt Company.