Commit 91cac3e0 authored by Christoffer Ackelman's avatar Christoffer Ackelman

QT: navigator widgets now grab focus when realized.

parent 5289da6c
......@@ -65,6 +65,7 @@
#include "wb_wpkg_qt.h"
#include "wb_wtt_qt.h"
#include <QApplication>
#include <QCloseEvent>
#include <QDialogButtonBox>
#include <QInputDialog>
......@@ -2292,6 +2293,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;
}
......@@ -2532,4 +2538,4 @@ void WttQt::disable_focus()
void WttQt::update_title()
{
CoWowQt::update_title(toplevel, editmode);
}
\ No newline at end of file
}
......@@ -291,4 +291,5 @@ void QtScrollWidgetFlow::realize()
client_data, static_cast<flow_eCtxType>(ctxType));
}
}
}
\ No newline at end of file
setFocus();
}
......@@ -293,4 +293,5 @@ void QtScrollWidgetGlow::realize()
client_data, static_cast<glow_eCtxType>(ctxType));
}
}
}
\ No newline at end of file
setFocus();
}
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