Results 1 to 2 of 2

Thread: resize problem, example and document not correct?

  1. #1
    Join Date
    Dec 2010
    Posts
    5
    Thanks
    2
    Qt products
    Qt4 Qt/Embedded PyQt3 PyQt4
    Platforms
    Windows Symbian S60 Maemo/MeeGo

    Default resize problem, example and document not correct?

    In qt document, it wrote:
    Warning: Calling resize() or setGeometry() inside resizeEvent() can lead to infinite recursion.

    but when I debug this, for example, making some breakpoints inside resizeEvent(), which calls setGeometry(), it doesn't cause the infinite loop. I use carbide and symbian sdk plus qt 4.7.

    Further more: IF it causes infinite loop, why below example from forum nokia deosn't?
    http://wiki.forum.nokia.com/index.ph...g_with_QWidget

    It has same kind of mechnism, when the resize event comes, it goes to the QtEggAlarm::eventFilter first, then the function SetScreenSizeAndPosition is called, inside, it resets the geometry, then it will trigger anther resize event, which will go to filter again....

    so my conclusion is that the qt document is wrong?

  2. #2
    Join Date
    Jan 2006
    Location
    Belgium
    Posts
    1,938
    Thanked 268 Times in 268 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Wiki edits
    20

    Default Re: resize problem, example and document not correct?

    If you believe that part of the documentation is wrong, feel free to ignore it.

    However, it is NOT wrong.
    The recursion doesn't happen because the size stops changing in the example you mention, thus there's no second (or third?) resize event.

    The docs clearly state "can"

Similar Threads

  1. Qt Creator Problem selecting the correct mkspec/qmake.conf file
    By weaver4 in forum Qt Tools
    Replies: 1
    Last Post: 2nd December 2010, 13:37
  2. resize problem
    By yuvaraj.yadav in forum Qt Programming
    Replies: 3
    Last Post: 4th May 2009, 17:42
  3. QGLWidget resize problem.
    By anderl in forum Qt Programming
    Replies: 2
    Last Post: 22nd January 2008, 08:57
  4. QMainWindow resize problem
    By edb in forum Qt Programming
    Replies: 5
    Last Post: 12th January 2007, 10:31
  5. Resize Problem
    By mambo in forum Qt Programming
    Replies: 1
    Last Post: 9th October 2006, 15:41

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.