PDA

View Full Version : How to start selecting text programmaticaly in QTextEdit



Maleesh
30th March 2013, 09:07
Hi all,

I want to have a text selection method like in visual studio (please see below image).

8865

Characteristics of this selection are,
1. Single click on line number area causes to select the entire line.
2. You can continue to select text in normal way as in any editor, regardless the fact that the click was originated in line number area instead of text-edit area. Please see below image.

8866

I tried to do this by posting a mouse left-press to QTextEdit area, when I click on line number area. But it doesn't do anything at all. :) Any ideas please ?

I'm using,

Windows 7
Qt 4.8



PS: This is my first post, so please correct me if I do anything stupid in this thread. :)