dimanche 30 octobre 2016

detecting user input with QTextEdit (& distinguishing it from application changes)

Gtk3 rich text widget machinery (based upon GtkTextBuffer & GtkTextView) has both "begin-user-action" and "end-user-actions" signals, which permits quickly to process user input conveniently (and distinguish it from application generated changes to the buffer or the view).

But it looks like there is no similar stuff in Qt5. For example, my incomplete understanding is that QTextEdit::insertHtml or QTextDocument::contentsChange or QTextDocument::contentsChanged does not separate changes related to user input (either keyboard, or pasting, etc...) from those done by the application.

What I have in mind is some syntax oriented editor.

I'm probably misunderstanding Qt5 rich text editor support.

(For curious people: I am redesigning & reimplementing my MELT monitor with C & GTK into something with C++11 & Qt5 tentatively called Basixmo; all is GPL free software, but I have not coded yet the Qt5 thing)

Aucun commentaire:

Enregistrer un commentaire