ich habe ein Problem mit beim Umstieg von Qt 4 nach Qt 5 (Windows XP, VS 2010). Der Umstieg selbst machte wenig Probleme, kleinere Änderungen, aber das ging.
Nun ist das Verhalten meiner Dialoge allerdings anders als bei Qt 4. Die Dialoge habe ich als Tool Dialoge implementiert.
Konstruktor eines QDialogs:
Code: Alles auswählen
AboutDialog::AboutDialog( QWidget* parent )
: QDialog( parent, Qt::Tool )
{
ui.setupUi( this );
}
Code: Alles auswählen
AboutDialog aboutDialog( this );
aboutDialog.retranslate();
aboutDialog.exec();
Code: Alles auswählen
int AboutDialog::exec()
{
// Mein Krams hier
QDialog::activateWindow();
return QDialog::exec();
}
Bei Qt 4 funktioniert das auch, aber bei Qt 5 geht das nicht mehr. Ich habe auch schon raise() und setFocus() probiert, aber das verdammte Ding will von sich aus nicht in den Vordergrund.
Kann mir jemand helfen?
Viele Grüße
Oliver