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. Watermark in QTextEdit
QtWS25 Last Chance

Watermark in QTextEdit

Scheduled Pinned Locked Moved General and Desktop
5 Posts 2 Posters 3.3k 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.
  • G Offline
    G Offline
    GrahamL
    wrote on last edited by
    #1

    Hi
    I have a QTextEdit in which I want to display a watermark
    Could someone tell me if this is possible and how I can achieve this

    Thanks

    1 Reply Last reply
    0
    • A Offline
      A Offline
      adnan
      wrote on last edited by
      #2

      Do you want a permanent background watermark or the one which disappears with a click like usernames and passwords

      1 Reply Last reply
      0
      • G Offline
        G Offline
        GrahamL
        wrote on last edited by
        #3

        Hi
        Thanks for your reply
        I require a permanent background watermark

        1 Reply Last reply
        0
        • A Offline
          A Offline
          adnan
          wrote on last edited by
          #4

          You can have a temporary watermark using
          @setPlaceholderText ("some text")@

          .

          1 Reply Last reply
          0
          • A Offline
            A Offline
            adnan
            wrote on last edited by
            #5

            For permanent watermark
            @lineEdit->setFrame(false);
            QLineEdit {
            image: url(:/images/watermark.png);
            }
            @

            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