Results 1 to 3 of 3

Thread: Highlight current line in textedit

  1. #1
    Join Date
    Nov 2013
    Location
    Chandigarh, India
    Posts
    62
    Thanks
    8
    Thanked 11 Times in 7 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Windows

    Default Highlight current line in textedit

    I want to set the background color of the entire line in which I am currently typing with some color. I referred to various links but they showed formatting of text. I wish to format the background of current line. Is there any way to do it?

  2. #2
    Join Date
    Oct 2011
    Posts
    27
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Highlight current line in textedit

    Please use the docs and helps of Qt wich are really good before posting here ...
    The "code editor example" answers your question !

  3. #3
    Join Date
    Feb 2012
    Location
    Armenia/Yerevan
    Posts
    400
    Thanks
    15
    Thanked 16 Times in 15 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11

    Default Re: Highlight current line in textedit

    Quote Originally Posted by aaditya190 View Post
    I want to set the background color of the entire line in which I am currently typing with some color. I referred to various links but they showed formatting of text. I wish to format the background of current line. Is there any way to do it?
    take a look at setStyleSheet() property of the widgets in the docs.

Similar Threads

  1. Replies: 1
    Last Post: 3rd December 2013, 02:19
  2. TextEdit with one line
    By alizadeh91 in forum Qt Quick
    Replies: 4
    Last Post: 3rd November 2012, 21:53
  3. QTableWidget highlight current position in header
    By lalesculiviu in forum Qt Programming
    Replies: 0
    Last Post: 27th February 2010, 19:10
  4. Insert line to textedit
    By wirasto in forum Qt Programming
    Replies: 1
    Last Post: 18th December 2009, 15:59
  5. How can I paint a line in TextEdit on QT-4.3.2?
    By cslijy in forum Qt Programming
    Replies: 2
    Last Post: 23rd November 2007, 08:08

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.