Problem with cursorPosition
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 Kris Duraj over 10 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?