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. QTextEdit font problem
Qt 6.11 is out! See what's new in the release blog

QTextEdit font problem

Scheduled Pinned Locked Moved Solved General and Desktop
3 Posts 2 Posters 278 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.
  • MortyMarsM Offline
    MortyMarsM Offline
    MortyMars
    wrote on last edited by
    #1

    Hello everyone,

    Sorry for this beginner's question, but I can't seem to restore the font of some 'QTextEdit' to their default appearance.
    I've tried changing a whole bunch of parameters, but nothing seems to work.

    Capture d’écran 2024-06-02 à 21.27.59.jpg

    The lines marked with a red 'No' are the wrong ones.
    And the ones marked with a green 'Yes' are the ones with the desired result.

    Thanks for your help.

    1 Reply Last reply
    0
    • jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Sorry, but this is not enough information.
      You did not tell how and what exactly you changed and how you're trying to change it back.

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      1
      • MortyMarsM Offline
        MortyMarsM Offline
        MortyMars
        wrote on last edited by
        #3

        Thank you @jsulm for your help.

        In fact I didn't know how this shaping takes place without me changing anything, consciously anyway.
        And as a result, I didn't know how to get rid of it and go back to the default situation.
        I'm the one who's sorry I didn't explain the situation clearly...

        However, I've found a solution, which is probably not very academic but which is proving effective.
        When I see a QTextEdit with the unwanted formatting :

        1. I open the editor (by double-clicking)
        2. I switch to ‘source'
        3. I select the contents of the window
        4. I delete everything
        5. I confirm with 'OK

        Now I have a 'reset' QTextEdit

        Capture d’écran 2024-06-04 à 00.30.08.jpg

        1 Reply Last reply
        0
        • MortyMarsM MortyMars has marked this topic as solved on

        • Login

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