Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. QML TextEdit: How can I change the richtext header?
Forum Updated to NodeBB v4.3 + New Features

QML TextEdit: How can I change the richtext header?

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
1 Posts 1 Posters 192 Views
  • 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.
  • S Offline
    S Offline
    Saurausli
    wrote on last edited by
    #1

    I'd like to change the header from a richtext from:

    <head><meta name="qrichtext" content="1" /><style type="text/css">
    p, li { white-space: pre-wrap; }
    </style></head>

    to :

    <head><meta name="qrichtext" content="1" /><style type="text/css">
    p, li { white-space: pre; }
    </style></head>

    Is there a way to change white-space?

    Here is my code:

    import QtQuick 2.12
    import QtQuick.Window 2.12
    
    Window {
        visible: true
        width: 640
        height: 480
        TextEdit{
            anchors.fill: parent
            anchors.margins: 10
            textFormat: Qt.RichText
            text: "<pre> test </pre>"
        }
    }
    
    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