Results 1 to 3 of 3

Thread: QTextEdit watermark

  1. #1
    Join Date
    Mar 2010
    Posts
    107
    Thanks
    22
    Qt products
    Qt4
    Platforms
    Windows

    Default QTextEdit watermark

    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

  2. #2
    Join Date
    Sep 2011
    Location
    Manchester
    Posts
    538
    Thanks
    3
    Thanked 106 Times in 103 Posts
    Qt products
    Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: QTextEdit watermark

    On QTextEdit set your watermark image as background using setStyleSheet() and change QPalette::Base to Qt::NoBrush.

  3. The following user says thank you to Spitfire for this useful post:

    GrahamLabdon (13th March 2012)

  4. #3
    Join Date
    Mar 2010
    Posts
    107
    Thanks
    22
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QTextEdit watermark

    Thank-you
    It works!

Similar Threads

  1. QTextEdit Help !
    By chendy in forum Qt Programming
    Replies: 3
    Last Post: 1st April 2009, 03:18
  2. QTextEdit
    By veda in forum Qt Programming
    Replies: 4
    Last Post: 11th September 2007, 07:30
  3. Replies: 1
    Last Post: 16th February 2007, 07:22
  4. QTextEdit Help pls
    By munna in forum Newbie
    Replies: 6
    Last Post: 7th May 2006, 19:18
  5. 4.1 to 4.1.1, qtextedit
    By jey in forum Qt Programming
    Replies: 5
    Last Post: 9th March 2006, 12:48

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.