Hello everybody.

I think found the origin of my problems using Qwt library.

I'm trying to port my application from qwt-5.x (patched with multiaxes) and QT4.7.x to qwt-6.1-multiaxes and Qt 5.6.0.

My application loads an ui file which contains a QwtPlot object.

To find the QwtPlot objet I used MainWindow->findChildren<QwtPlot *>(), which works if the object is created using new QwTPlot(MainWindow), but fails if MainWindow is created using QUiLoader utility from a ui file.

e.g.
This code works.
MainWindow=new QMainWindow(this);
QwtPlot* plot=new QwtPlot(MainWindow);
QList<QwtPlot*> varQwt = MainWindow->findChildren<QwtPlot *>();

varQwt will contain the plot widget pointer.

This code instead doesn't work.
QUiLoader *loader=new QUiLoader();
QFile file;
file.setFileName("c://zs5g2//qwt.ui");
if(file.open(QFile::ReadOnly)==false)
return;
//Load the Window
MainWindow(QMainWindow*)loader->load(&file,0);
file.close();
QList<QwtPlot*> varQwt = MainWindow->findChildren<QwtPlot *>();

varQwt will be empty.

Unfortunately, this is only one of the problems, I can retrieve the object inspecting MainWindow and finding the qwt object with its object name, but I get several errors and segfaults with almost any object attached to the plot.

It seems uiloader doesn't instantiate correctly for qwt objects in ui files, any hint on how to fix it?

Regards
Valentino