Hi everybody,
I'm having problems when using QList to generate run-time widgets. I create those widgets and store them inside the QList for later use.
In one of my dialogs I need to create one QSpinBox and one QLineEdit dynamically. When I create them, everything works fine, and they are shown, but when I close the dialog, the application crashes. Here's the explanation of what I'm doing:

I create in my header file the QList variable as following:

private:
QList<QLineEdit*> products;

And I use it in in the source file like this:
QLineEdit *qleProducts = new QLineEdit();
qleProducts->setCompleter(completer); //Sets widget custom completer, defined before, it works OK
layout->addWidget(qleProducts); //Adds the widget to a layout
products.append(qleProducts);

Then, compile, and everything works OK.
But the problem comes when I try to create another QList object.
In the header file I add:
QList<QSpinBox*> totals;

And in the source file:
QSpinBox *qsbTotals= new QSpinBox();
layout->addWidget(qsbTotals);
totals.append(qsbTotals);

Then, I compile the application, it compiles OK, I execute the dialog, creates and display the widgets OK, but when I close the dialog, the application crashes, returning code -1073741819 but no other error.

It seems that the program crashes when I have declared two QList variables in one file.
Maybe it is a QT bug, or I'm just missing something stupid.
Please, I need help, I really need to solve this.

I'm sorry for my poor English, I'm Argentinian.
Best regards,
Facundo