pospiech
11th April 2008, 14:49
If I do the following
void DialogExample::showEvent ( QShowEvent * event )
{
close();
}
The Dialog is not closed. Instead the Dialog Interface is frozen on the screen and can not be closed with the mouse anymore.
Why ? What is the solution?
The complete problem is the following
void DialogAgilentPowerSensor::showEvent ( QShowEvent * event )
{
if (!m_isAgilentPowerSensorLoaded)
{
int ret = QMessageBox::critical(this, "Warning",
"Could not connect to Agilent Power Sensor",
QMessageBox::Cancel);
close();
}
}
Thus, in the constructor a class is loaded and after the construction the dialog shall be closes if the device could not be loaded.
Matthias
void DialogExample::showEvent ( QShowEvent * event )
{
close();
}
The Dialog is not closed. Instead the Dialog Interface is frozen on the screen and can not be closed with the mouse anymore.
Why ? What is the solution?
The complete problem is the following
void DialogAgilentPowerSensor::showEvent ( QShowEvent * event )
{
if (!m_isAgilentPowerSensorLoaded)
{
int ret = QMessageBox::critical(this, "Warning",
"Could not connect to Agilent Power Sensor",
QMessageBox::Cancel);
close();
}
}
Thus, in the constructor a class is loaded and after the construction the dialog shall be closes if the device could not be loaded.
Matthias