If I do the following
void DialogExample
::showEvent ( QShowEvent * event
) {
close();
}
void DialogExample::showEvent ( QShowEvent * event )
{
close();
}
To copy to clipboard, switch view to plain text mode
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)
{
"Could not connect to Agilent Power Sensor",
close();
}
}
void DialogAgilentPowerSensor::showEvent ( QShowEvent * event )
{
if (!m_isAgilentPowerSensorLoaded)
{
int ret = QMessageBox::critical(this, "Warning",
"Could not connect to Agilent Power Sensor",
QMessageBox::Cancel);
close();
}
}
To copy to clipboard, switch view to plain text mode
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
Bookmarks