Support #1198
openProblem with cursorPosition
0%
Description
In WTextArea and WLineEdit are function cursorPosition(), hasSelectedText(), etc. And for example when I create WPushButton named "Get Cursor Position" (know what it is to serve). Every click on this button get blurred on WTextArea, and function WTextArea->cursorPosition() gets --1. Also when I connect signal blurred() to WTextArea, cursorPosition also return --1. That same for changed().
Of course on keyWentUp() function cursorPosition works fine, but I don't want geting so many requests (on every click) to server. Is any way to do this?
Updated by Koen Deforche over 12 years ago
- Status changed from New to Feedback
Hey Kris,
The focus handling of a browser bites you --- what do you want to do with the cursor position ?
Regards,
koen
Updated by Kris Duraj over 12 years ago
I have WLineEdit and WPushButton. Into wlineedit I insert some text. And by clicking on wpushbutton I'm trying to get cursorPosition from lineedit. But during clicking wpushbutton wlineedit losing focus, and wlineedit->cursorPosition() return --1. How can I get cursorPosition?