qt creator - Qt On screen keyboard, How to get selected Text Edit -


I have to do a GUI for touch screen software, it is on the same window as text edits, I am thinking It was something simple with limited set of characters, (I have to make a pin pad for other windows later) The approach that I am thinking about is hard-coding of text modifications made by every button, problem I textedit is really focus (user's S chosen by the cursor)

So I would like to know how can I find out if text editing is currently on or not?

Besides this

Edit: This is my new code, what's wrong with it?

#include "settings2.h" #include "Ui_settings2.h" Settings 2 :: Settings 2 (QWidget * Basic): QWidget (parent), UI (new UI :: settings 2) {Ui- & gt; Setup UI (this); } Settings 2 :: ~ Settings2 () {Delete UI; } Zero Settings 2 :: on_q_btn_clicked () {QTextEdit * textedit = qobject_cast & lt; QTextEdit * & gt; (QApplication :: focusWidget ()); If (text edit) {textedit-> Settext ("aze");}}

the way you think Trying to get QTextEdit is incorrect. Additionally, as soon as you click on a button on your on-screen keyboard, the focus key will run and not on QTextEdit will form.

As soon as I come to a focus to find an indicator modified QTextEdit . In this way you will always know how the previous text was edited in the focus and a new text was placed on it.

You will have to write your own class succession QTextEdit and QTextEdit :: focusInEvent where you will see the above given indicator this Point indicator.


Comments

Popular posts from this blog

java - Can't add JTree to JPanel of a JInternalFrame -

javascript - data.match(var) not working it seems -

javascript - How can I pause a jQuery .each() loop, while waiting for user input? -