Results 1 to 4 of 4

Thread: QGLWidget, toolbox and paintGL()

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

    Question QGLWidget, toolbox and paintGL()

    I have a problem that sick me from much time;
    When my application starts, starts 3 updateWidget and 3 initializeGL() (with a qglwidget)without reason;
    I understand the cause is the toolbox; If I delete it in Designer this behavius there isn't;
    I think that is happening: application draw the entire widgetGL (using entire width of mainForm), after insert toolboox, and then must re-paint() because the width is grow down;
    is it possible? Why do I resolve it?
    Thanks
    Regards

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,365
    Thanks
    3
    Thanked 5,014 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QGLWidget, toolbox and paintGL()

    Quote Originally Posted by mickey
    Why do I resolve it?
    That's a really good question. Why do you want to solve it?

  3. #3
    Join Date
    Jan 2006
    Posts
    976
    Thanks
    53
    Qt products
    Qt3
    Platforms
    Windows

    Default Re: QGLWidget, toolbox and paintGL()

    Quote Originally Posted by wysota
    That's a really good question. Why do you want to solve it?
    Sorry. The question was: How do I resolve it? I'd like resolve it because: 1. I think that there are 2 paint unuseful (with toolBox 3 paintGL(), without it, 1 paintGL()!); then because I think the cause is a QWidget/toolBox/stackWidget don't put good; (or maybe a bug?) Thanks
    Regards

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,365
    Thanks
    3
    Thanked 5,014 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QGLWidget, toolbox and paintGL()

    But why do you treat one, two or even three additional paint events as bugs? Are they expensive enough to spend a month trying to get rid of them? Obcuring the GL window will cause a paint event too -- do you want to freeze all other windows just to prevent an additional paint event? I could understand if you had an additional repaint every second, but you have ONE or TWO additional repaints during the whole life of the application. It is true that it could be caused by repositioning widgets on the form and it is possible that by manipulating the order of creating widgets you might be able to get rid of one repaint, but is it really that important? Especially given the fact, that the repaint takes place at a well known point in time -- if you want it to be less expensive, just delay creation of complex objects until the additional repaint is completed. You'll get flicker, but will gain some cpu cycles.

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.