Results 1 to 4 of 4

Thread: QPlaintTextEdit and setFont to selected Char

  1. #1
    Join Date
    Apr 2012
    Posts
    40
    Platforms
    Unix/X11 Windows

    Default QPlaintTextEdit and setFont to selected Char

    Hi, how can setFont() to selected char in QPlainTextEdit (no to all QPlainTextEdit) ???

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,376
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Thanks
    4
    Thanked 5,019 Times in 4,795 Posts
    Wiki edits
    10

    Default Re: QPlaintTextEdit and setFont to selected Char

    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. #3
    Join Date
    Apr 2012
    Posts
    40
    Platforms
    Unix/X11 Windows

    Default Re: QPlaintTextEdit and setFont to selected Char

    setCurrentCharFormat () it's work thx
    i have next question, if i want save all text inside QPlainTextEdit to file and load this text(with this font), then i have make big array of QTextCharFormat and save this TextCharFormat for each char in QPlainTextEdit, or is better way ??

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,376
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Thanks
    4
    Thanked 5,019 Times in 4,795 Posts
    Wiki edits
    10

    Default Re: QPlaintTextEdit and setFont to selected Char

    You can use any approach you like as long as you write code that is going to read the text back from the file. Or you can save the text using html subset of which is supported internally by QTextDocument.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. calling setFont() twice causes infinite repaint
    By Cruz in forum Qt Programming
    Replies: 1
    Last Post: 17th January 2012, 22:22
  2. QApplication::setFont working only for some widgets?
    By golanwe in forum Qt Programming
    Replies: 0
    Last Post: 13th January 2011, 18:47
  3. setFont doesn't work
    By DadaLee in forum Qt for Embedded and Mobile
    Replies: 1
    Last Post: 11th August 2008, 07:29
  4. Problem with setFont for a PushButton
    By arunvv in forum Newbie
    Replies: 12
    Last Post: 8th April 2008, 00:35
  5. QPainter, scale(), and setFont()
    By c_07 in forum Qt Programming
    Replies: 11
    Last Post: 2nd January 2008, 20:46

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
  •  
Qt is a trademark of The Qt Company.