Re: Qt release conf problem
How did you make the two forms and their classes ? If you made with Qt creator you should get the classes yourself.
From the code it seems there must be some parenting issue with the forms. Its hard to tell exactly without knowing the complete code.
If you can post atleast the creation of widgets code, may be we can help more.
Re: Qt release conf problem
This is the part of code connected with creating GUI
stdafx.h
Code:
#ifndef STDAFX_H
#define STDAFX_H
#include <QWidget>
#include <QMessageBox>
#include <QFileDialog>
#include <QString>
#include <QPixmap>
#include <QTableWidgetItem>
#include <QList>
#include <QDir>
#include <QComboBox>
#include "ui_mainwidget.h"
#include "ui_result.h"
#include "imageprocessor.h"
#endif // STDAFX_H
MainWidget.h
Code:
#ifndef MAINWIDGET_H
#define MAINWIDGET_H
#include "stdafx.h"
namespace Ui
{
class MainWidget;
}
{
Q_OBJECT
public:
explicit MainWidget
(QWidget *parent
= 0);
~MainWidget();
public slots:
void onLoadBtnClicked();
void onProcBtnClicked();
void onExportBtnClicked();
void onExportAllBtnClicked();
void onDeleteBtnClicked();
void onTabChanged();
void onMoveToGoodWndsBtnClicked();
void onMoveToBadWndsBtnClicked();
private:
Ui::MainWidget *ui;
Ui::ResWidget *resUi;
ImageProcessor *imageProc;
void setResUi();
void showGoodWnds();
void showBadWnds();
};
#endif // MAINWIDGET_H
MainWidget.cpp
Code:
#include "mainwidget.h"
// CONSTRUCTORS
//
MainWidget
::MainWidget(QWidget *parent
) : ui(new Ui::MainWidget)
{
ui->setupUi(this);
// Connect buttons
QObject::connect(ui
->loadBtn,
SIGNAL(clicked
()),
this, SLOT(onLoadBtnClicked()));
QObject::connect(ui
->procBtn,
SIGNAL(clicked
()),
this, SLOT(onProcBtnClicked()));
imageProc = 0;
}
//
MainWidget::~MainWidget()
{
delete ui;
}
// SLOTS
//
void MainWidget::onProcBtnClicked()
{
if(0 == imageProc)
{
return;
}
setResUi();
showGoodWnds();
showBadWnds();
}
// PRIVATE FUNCTIONS
//
void MainWidget::setResUi()
{
// Load result window
resUi->setupUi(resWidget);
resWidget->show();
// Connect buttons of the result window
QObject::connect(resUi
->closeBtn,
SIGNAL(clicked
()),
resWidget, SLOT(close()));
QObject::connect(resUi
->exportBtn,
SIGNAL(clicked
()),
this, SLOT(onExportBtnClicked()));
QObject::connect(resUi
->exportAllBtn,
SIGNAL(clicked
()),
this, SLOT(onExportAllBtnClicked()));
QObject::connect(resUi
->deleteBtn,
SIGNAL(clicked
()),
this, SLOT(onDeleteBtnClicked()));
QObject::connect(resUi
->tabWidget,
SIGNAL(currentChanged
(int)),
this, SLOT(onTabChanged()));
QObject::connect(resUi
->moveToGoodBtn,
SIGNAL(clicked
()),
this, SLOT(onMoveToGoodWndsBtnClicked()));
QObject::connect(resUi
->moveToBadBtn,
SIGNAL(clicked
()),
this, SLOT(onMoveToBadWndsBtnClicked()));
//
resUi->tabWidget->setCurrentIndex(GOOD_TAB);
resUi->moveToGoodBtn->setEnabled(false);
}
As i said, all works perfectly in DEBUG mode; in RELEASE mode prgram stoppes executing at line 49 in MainWidget.cpp module.
Please help me((((
Re: Qt release conf problem
OK)) I've solved the problem - just added one more class for the second form - and all is right!!! thanks...