Project

General

Profile

Actions

Support #1198

open

Problem with cursorPosition

Added by Kris Duraj almost 13 years ago. Updated over 12 years ago.

Status:
Feedback
Priority:
Normal
Assignee:
-
Target version:
-
Start date:
03/19/2012
Due date:
% Done:

0%

Estimated time:

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?

Actions #1

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

Actions #2

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?

Actions

Also available in: Atom PDF