Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions QtOffscreenViews/QQuickViews/QQuickOffscreenEditText.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,15 @@ QQuickAndroidOffscreenEditText::QQuickAndroidOffscreenEditText()
connect(androidEditText(), SIGNAL(onTextChanged(QString,int,int,int)), this, SLOT(etTextChanged(QString,int,int,int)));
connect(androidEditText(), SIGNAL(onKeyBack(bool)), this, SLOT(etKeyBack(bool)));
connect(androidEditText(), SIGNAL(onEnterOrPositiveAction()), this, SLOT(etEnter()));
connect(androidEditText(), SIGNAL(onEditorAction(int)), this, SIGNAL(editorAction(int)));

connect(this, &QQuickItem::widthChanged, [this](){
androidEditText()->setWidth(width());
});

connect(this, &QQuickItem::heightChanged, [this](){
androidEditText()->setHeight(height());
});
}

void QQuickAndroidOffscreenEditText::etTextChanged(QString text, int start, int before, int count)
Expand Down
2 changes: 1 addition & 1 deletion QtOffscreenViews/QQuickViews/QQuickOffscreenEditText.h
Original file line number Diff line number Diff line change
Expand Up @@ -207,8 +207,8 @@ public slots:

//! Wraps QAndroidOffscreenEditText::onEnterOrPositiveAction().
void returnPressed();

void backPressed();
void editorAction(int action);

protected slots:
virtual void etTextChanged(QString text, int start, int before, int count);
Expand Down