Commit d33f315b authored by Christoffer Ackelman's avatar Christoffer Ackelman Committed by Esteban Blanc

QT: navigator widgets now grab focus when realized.

parent 975fe7ab
......@@ -65,6 +65,7 @@
#include "wb_wpkg_qt.h"
#include "wb_wtt_qt.h"
#include <QApplication>
#include <QCloseEvent>
#include <QDialogButtonBox>
#include <QInputDialog>
......@@ -2294,6 +2295,11 @@ WttQt::WttQt(void* wt_parent_ctx, const char* wt_name, const char* iconname,
pwr_mPrv_DevConfig | pwr_mPrv_DevPlc | pwr_mPrv_DevClass);
}
// setFocus() doesn't work since QApplication has not entered its
// main loop yet. Instead, add an event to the event queue and let
// QApplication process it later when it enters the main loop.
QApplication::sendEvent(toplevel, new QFocusEvent(QEvent::FocusIn));
*status = 1;
}
......
......@@ -291,4 +291,6 @@ void QtScrollWidgetFlow::realize()
client_data, static_cast<flow_eCtxType>(ctxType));
}
}
setFocus();
}
\ No newline at end of file
......@@ -293,4 +293,6 @@ void QtScrollWidgetGlow::realize()
client_data, static_cast<glow_eCtxType>(ctxType));
}
}
setFocus();
}
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment