If I do the following
Qt Code:
  1. void DialogExample::showEvent ( QShowEvent * event )
  2. {
  3. close();
  4. }
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
Qt Code:
  1. void DialogAgilentPowerSensor::showEvent ( QShowEvent * event )
  2. {
  3. if (!m_isAgilentPowerSensorLoaded)
  4. {
  5. int ret = QMessageBox::critical(this, "Warning",
  6. "Could not connect to Agilent Power Sensor",
  7. QMessageBox::Cancel);
  8. close();
  9. }
  10. }
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