Results 1 to 17 of 17

Thread: drawRect inside paintGL()

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Posts
    976
    Thanks
    53
    Qt products
    Qt3
    Platforms
    Windows

    Default Re: drawRect inside paintGL()

    with your code console ask me this: 'painter.begin(this);' adding this istruction seems works , but when I traslate /rotating my scene square disappear (calls to updateGL() ); strange: if I click on my scene (updateGL occurs) rect appear; I see that If I moveMouse with buttonMouse down paintEvent() not occurs; instead If I click only, paintEvent occur();
    Furthermore I have QWidget::mouseLeave() where inside there's an updateGL(): when I mouse mouse out, updateGL occurs and rect disappear!
    mmmmm....
    Regards

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: drawRect inside paintGL()

    It looks like QGLWidget repaints are handled in a special way. You might try rendering your scene to a pixmap, painting on that pixmap and then displaying it, but this will affect the performance.

Similar Threads

  1. paintGL() and initializeGL() help
    By mickey in forum Newbie
    Replies: 14
    Last Post: 26th February 2006, 17:15

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.