// The program is brought to front and activated when alerted
- raise();
+
activateWindow();
+ raise();
// The alerting timer is selected
ui->ComingAlertsTableView->selectionModel()->select(QItemSelection(indexOfAlerter,indexOfAlerter),QItemSelectionModel::SelectCurrent | QItemSelectionModel::Rows );
switch (event->type())
{
- case QEvent::ApplicationActivate:
+ case QEvent::WindowActivate:
model_.setUpdateViewOnChanges(true);
ui->debugLabel->setText("Returned to the application!");
break;
- case QEvent::ApplicationDeactivate:
+ case QEvent::WindowDeactivate:
model_.setUpdateViewOnChanges(false);
ui->debugLabel->setText("");
break;