I have a problem clearing the contents of a QComboBox.
The program I have written has two QComboBox objects in a QMainWindow derived window. Both are populated with QStringlists and, initially, work a treat. However, when I need to re-populate one of them, the program crashes when I call the combo box's clear() method. This happens if I call the method directly or through a signal. It only happens with one of the boxes, not the other. Also, if I have only one box in the window ( the other being commented out) there is no problem.
Stepping through the code I have found that line number 2910 in QObject.cpp is throwing an exception : -
try {
c->receiver->qt_metacall(QMetaObject::InvokeMetaMethod, method, argv ? argv : empty_argv);
} catch (...) {
if (c->receiver) {
c->receiver->d_func()->currentSender = previousSender;
c->receiver->d_func()->currentSenderSignalIdStart = previousFrom;
c->receiver->d_func()->currentSenderSignalIdEnd = previousTo;
}
throw;
Here "previousSender" is 0, both "previousFrom" and "previousTo" are -1.
Any ideas or suggestions will be greatfully received. If you need any further information please feel free to contact me.
I am using Qt version 4.2.1. The development environment is MS Visual Studio 2003 .NET with Visual C++ .NET with the Qt Visual Studio Integration version 1.1.3.
AdvThanksance.
Tony
Bookmarks