Results 1 to 2 of 2

Thread: QTextCharFormat::WaveUnderline doesn't work

  1. #1
    Join Date
    Apr 2008
    Posts
    104
    Thanks
    8
    Thanked 7 Times in 7 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default QTextCharFormat::WaveUnderline doesn't work

    Hello! I'm trying to underline some text with a waved line. Here is my code:

    f = cr.blockCharFormat ();
    f.setUnderlineStyle (QTextCharFormat::WaveUnderline);
    f.setUnderlineColor (Qt::red);
    f.setFontUnderline (true);
    cr.mergeCharFormat (f);
    [...]
    textEdit->setTextCursor (cr);
    Underlining work well, but I see just a plain, non-waved line (QTextCharFormat::SingleUnderline). The same thing happens with QTextCharFormat::SpellCheckUnderline and other underlingg styles - just the QTextCharFormat::SingleUnderline works in all cases.

  2. #2
    Join Date
    Apr 2011
    Posts
    1
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QTextCharFormat::WaveUnderline doesn't work

    setFontUnderline actually overwrites the underline style, simply remove that call, setUnderlineStyle is sufficient

Similar Threads

  1. Printing via QPrinter doesnt work
    By mSergey in forum Qt Programming
    Replies: 1
    Last Post: 16th January 2008, 19:00
  2. QActions don't work with menubar hidden
    By Pepe in forum Qt Programming
    Replies: 1
    Last Post: 16th August 2007, 01:04
  3. Change work area OS
    By pakulo in forum Qt Programming
    Replies: 15
    Last Post: 15th May 2007, 07:20
  4. QTextEdit Justify align making work
    By dec0ding in forum Qt Programming
    Replies: 2
    Last Post: 13th January 2006, 12:02

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.