Results 1 to 3 of 3

Thread: How to get current character from QTextEdit

  1. #1
    Join Date
    Oct 2008
    Location
    Thodupuzha, a small town in kerala
    Posts
    31
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default How to get current character from QTextEdit

    How can I get the character at current cursor position in QTextEdit . I am using QT3.3 .

  2. #2
    Join Date
    Sep 2008
    Location
    Bangalore
    Posts
    659
    Thanks
    116
    Thanked 42 Times in 41 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: How to get current character from QTextEdit

    Qt Code:
    1. QTextCursor cursor(TextEdit->textCursor());
    2. int QTextCursor::position () const
    3. TextEdit->setTextCursor(cursor);
    To copy to clipboard, switch view to plain text mode 

    try this ...

  3. #3
    Join Date
    Aug 2008
    Location
    Ukraine, Krivoy Rog
    Posts
    1,963
    Thanked 370 Times in 336 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: How to get current character from QTextEdit

    Qt Assistant -- rocks!
    please, use tags [CODE] & [/CODE].

Similar Threads

  1. Replies: 2
    Last Post: 20th February 2012, 21:58
  2. How to get current word in Qtextedit
    By iamjayanth in forum Qt Programming
    Replies: 5
    Last Post: 6th April 2009, 08:57
  3. Distributing QT application for Mac OS
    By mb0 in forum Qt Programming
    Replies: 1
    Last Post: 31st May 2007, 18:59
  4. Replies: 15
    Last Post: 21st April 2007, 17:46
  5. Finidng the pixels for a character in QTextEdit
    By sukanyarn in forum Qt Programming
    Replies: 1
    Last Post: 27th October 2006, 09:56

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.