How to implement "mouse events" in QTextEdit ?
-
THIS IS NOT A REPOST I WILL EDIT IT / DELETE WHAT IS NECESSARY WHEN I GET A RESPONSE, SO DO NOT GET EXITED.
I am using the older post for info only.. After more reading I realized I have overlooked the obvious - I am not checking for mouse events.
The attached text highlighting is clearly reaction to some event and it must be mouse itself.Could somebody point me to some examples on how to handle mouse events?
I have scanned this
https://linux.die.net/man/3/qtextedit
but I cannot see how to initialize text editing after mouse event is detected.'Here is a debug output of the code .
It shows where xterm output (winId 12582986)
it verifies that subwindow actually detected SINAL 'textChanged - run CCC_MdiChild::TextChanged()
and sort of closed the task by test running bool CCC_MdiChild::maybeSave()If there are activities in the current sub window - highlight a word or character -
click /double click I expect "selecctionChanged " SIGNAL and have "connect" setup for it.
It never comes.I think this is related not able to actually link to current subwindow to retrieve text - cannot get text if I cannot
generate ' selectionChangged' SIGNAL...params ("-T", "bluetoothctl no options (interactive) case 1 -hold file ", "-fa", "Monospace", "-fs", "14", "-hold", "-into", "12582986", "-geometry", "200x200+1000+1000", "-e", "bluetoothctl | tee /tmp/temp.txt")
QProcess::start: Process is already running
processTERMINAL->waitForStarted() OK
""
""
TRACE_MDI_XTERM int CCC_MdiChild::TextChanged()
TRACE_MDI_XTERM @line "128"
TRACE_MDI_XTERM bool CCC_MdiChild::maybeSave()
TRACE_MDI_XTERM @line "433"ADDENDUM
This maybe a clue to figure out "who is on first " - the xterm has "geometry" option - it may be set wrong, but the resulting widow does not reflect those dimensions set in "geometry " the default size setting is so far unknown.
So it this window true MDI subwindow or something else?
It can be move / resized / delete etc - as a subwindow should.ONE MORE ADDENDUM - I am hoping it will help finding the solution
I can highlight the selected text using mouse - so some events SIGNALs are generated.
I can move the mouse into the subwindow and the cursor gets highlighted - cannot be "screen shot " ,SECOND ADDENDUM
This indicates that the actuall size of the subwindow is "causing" the problem.
Both displays are results of same xterm parameters / options .
The actual results are different AFTER the first xterm is processed - that is normal....
The display in TAB MDI are in "frame", the display in MDI is in QTextEdit subwindow - that are the differences.I cannot find where is the default size of the subwindow set.... nor how to set if when xterm QProcess is executed.
Maybe I really need to add "form" to QTextEdit - could somebody help me to do that ? ( Request posted in another thread ...
so far no answer ...)