KDDockWidgets may need an event-loop iteration to finish opening or tabifying a dock widget before raise() can switch to it. Defer raise(), activateWindow(), and setFocus() via QMetaObject::invokeMethod with Qt::QueuedConnection after show().