Change-Id: I69bac4d1ce55271685dcddcc4c8ad2f6598e7630
Reviewed-on: http://codereview.qt-project.org/4439
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
*/
void QSGTextEdit::openSoftwareInputPanel()
{
- if (qApp) {
- if (canvas()) {
- QEvent event(QEvent::RequestSoftwareInputPanel);
- QGuiApplication::sendEvent(canvas(), &event);
- }
- }
+ if (qGuiApp)
+ qGuiApp->inputPanel()->show();
}
/*!
*/
void QSGTextEdit::closeSoftwareInputPanel()
{
- if (qApp) {
- if (canvas()) {
- QEvent event(QEvent::CloseSoftwareInputPanel);
- QGuiApplication::sendEvent(canvas(), &event);
- }
- }
+ if (qGuiApp)
+ qGuiApp->inputPanel()->show();
}
void QSGTextEdit::focusInEvent(QFocusEvent *event)
*/
void QSGTextInput::openSoftwareInputPanel()
{
- if (qApp) {
- if (canvas()) {
- QEvent event(QEvent::RequestSoftwareInputPanel);
- QCoreApplication::sendEvent(canvas(), &event);
- }
- }
+ if (qGuiApp)
+ qGuiApp->inputPanel()->show();
}
/*!
*/
void QSGTextInput::closeSoftwareInputPanel()
{
- if (qApp) {
- if (canvas()) {
- QEvent event(QEvent::CloseSoftwareInputPanel);
- QCoreApplication::sendEvent(canvas(), &event);
- }
- }
+ if (qGuiApp)
+ qGuiApp->inputPanel()->hide();
}
void QSGTextInput::focusInEvent(QFocusEvent *event)