Fixed crash on startup with vtk6+qt5. All cloud viewers in QDockWidget are now created manually instead of being defined in the *.ui files. The generated ui didn't pass the top level parent window to constructor of CloudViewer, which caused a problem when initializing the QVTKWidget.

This commit is contained in:
matlabbe
2016-05-05 18:25:26 -04:00
parent 74d0bfa1bb
commit ad0afc58c0
11 changed files with 455 additions and 250 deletions

View File

@@ -98,6 +98,7 @@ PreferencesDialog::PreferencesDialog(QWidget * parent) :
_ui(0),
_indexModel(0),
_initialized(false),
_progressDialog(new QProgressDialog(this)),
_calibrationDialog(new CalibrationDialog(false, ".", this)),
_createCalibrationDialog(new CreateSimpleCalibrationDialog(".", "", this))
{
@@ -105,6 +106,10 @@ PreferencesDialog::PreferencesDialog(QWidget * parent) :
_calibrationDialog->setWindowFlags(Qt::Window);
_calibrationDialog->setWindowTitle(tr("Calibration"));
_progressDialog->setWindowTitle(tr("Read parameters..."));
_progressDialog->setMaximum(2);
_progressDialog->setValue(2);
_ui = new Ui_preferencesDialog();
_ui->setupUi(this);
@@ -817,11 +822,6 @@ PreferencesDialog::PreferencesDialog(QWidget * parent) :
this->setupTreeView();
_obsoletePanels = kPanelAll;
_progressDialog = new QProgressDialog(this);
_progressDialog->setWindowTitle(tr("Read parameters..."));
_progressDialog->setMaximum(2);
_progressDialog->setValue(2);
}
PreferencesDialog::~PreferencesDialog() {