Results 1 to 3 of 3

Thread: How to mess QMdiArea indexes?

  1. #1
    Join Date
    Sep 2007
    Location
    Sant'Elpidio a Mare, Italy
    Posts
    194
    Thanks
    54
    Thanked 2 Times in 2 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Windows

    Lightbulb How to mess QMdiArea indexes?

    Hi,

    Since my problem is too hard to explicate, I'm looking for ideas.
    I'm going to request a brain-storming, I need all sort of suggestions, hints, tips, and more, then I'll try appropriated solutions.

    The topic is: "How could you mess up QMdiArea indexes?"
    Imagine that you have to mess up the indexes of the subwindows of a QMdiArea, in order to obtain a:
    ASSERT failure in QList<T>::at: "index out of range", file ../../include/QtCore/../../src/corelib/tools/qlist.h, line 391

    So, since indexes are anyway managed internally by QMdi system, how could be possible to twist this system, having an index that referse to -1 or to a number larger than the effective number of opened widgets?
    Delete, removeSubWindows,WA_DeleteOnClose... everything, even the most useless idea might be usefull!
    Ok, let's go.
    Last edited by Raccoon29; 21st April 2008 at 17:10. Reason: reformatted to look better
    --
    raccoon29

    "La mia vita finirà quando non vedrò più la gente ridere...non necessariamente alle mie battute "

  2. #2
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: How to mess QMdiArea indexes?

    Why don't you get a backtrace and see exactly where the call comes from?
    J-P Nurmi

  3. #3
    Join Date
    Sep 2007
    Location
    Sant'Elpidio a Mare, Italy
    Posts
    194
    Thanks
    54
    Thanked 2 Times in 2 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Windows

    Default Re: How to mess QMdiArea indexes?

    Quote Originally Posted by jpn View Post
    Why don't you get a backtrace and see exactly where the call comes from?
    Because actually I don't know how to get it...
    Anyway debugging I found the calling function, but the mistery continues.

    Update: I discovered another input, so the question now is become:
    "if I close the MdiSubWindow I get the assertion failed. If before to close the same MdiSubWindow, I make it lose the focus (because I switched to another application, then I came back, for example), and then I close it, no assertion failed. The healing focus. Now the question is: why this weirdness? What sort of magic acts the loss of the focus??"

    Thank you so far, please continue with your ideas!
    --
    raccoon29

    "La mia vita finirà quando non vedrò più la gente ridere...non necessariamente alle mie battute "

Similar Threads

  1. QMdiArea unwanted actvation
    By fullmetalcoder in forum Qt Programming
    Replies: 7
    Last Post: 12th November 2007, 07:09

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.