[Qt-interest] My program keeps crashing in qt 4.5
Nicolas
nicolas at happycontent.com
Wed Mar 4 23:07:50 CET 2009
Hello.
> The problem was that I was trying to delete action in slot connected to
> QAction::triggered(). My slot worked proprely but same of QMenu internal
> functions (probably QMenu::findIdForAction()) crashed (how this could work
> in qt 4.4?).
For anyone interested, I had the same issue with a QMenu::clear() during a
QAction::triggered() signal - the program would crash with 4.5 (rc1), but
worked with 4.2.
My solution was to clear the menu when it's opened (QMenu::aboutToShow signal)
instead of during signal handling (the menu is a "recent file" menu, so it
changes when an item is selected to move it on top).
Nicolas
More information about the Qt-interest-old
mailing list