Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Double the font size in QTextEdit

Double the font size in QTextEdit

Scheduled Pinned Locked Moved General and Desktop
1 Posts 1 Posters 574 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    cic1988
    wrote on last edited by
    #1

    Hi all,

    I have used the following code to change some parts of the font size in the whole text edit:

    @void testTextView :: setInsertTextColor(const QColor& color)
    {
    QTextCharFormat fmt;
    fmt.setForeground(color);

    QTextCursor cursor = m_edit -> textCursor();
    cursor.mergeCharFormat(fmt);

    m_edit -> mergeCurrentCharFormat(fmt);
    }@

    and after this I cannot change the whole font size, which contains the specific formats in the text edit by calling zoomIn/out.

    is there any idea to solve the problem?

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved