Results 1 to 1 of 1

Thread: How to start selecting text programmaticaly in QTextEdit

  1. #1
    Join Date
    Mar 2010
    Posts
    4
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4
    Platforms
    Windows

    Default How to start selecting text programmaticaly in QTextEdit

    Hi all,

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

    Untitled.png

    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.

    Untitled2.png

    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.
    Last edited by Maleesh; 30th March 2013 at 10:39.

Similar Threads

  1. QPlainTextEdit selecting Text without moving anchor
    By janeljanson in forum Qt Programming
    Replies: 1
    Last Post: 6th June 2012, 13:47
  2. Selecting Text QPlainTextEdit
    By smhall316 in forum Newbie
    Replies: 0
    Last Post: 7th December 2010, 21:09
  3. Trouble with cursor and selecting text in QTextEdit
    By R_Torsten in forum Qt Programming
    Replies: 3
    Last Post: 7th June 2008, 20:17
  4. selecting text in Qwt plots
    By kaustav98255 in forum Qwt
    Replies: 3
    Last Post: 12th May 2008, 09:11
  5. [Solved] Selecting text with mouse in a QGraphicsTextItem
    By pherthyl in forum Qt Programming
    Replies: 2
    Last Post: 11th August 2007, 20:10

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.