Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-54626

ExtraSelection with underline not visible

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P1: Critical
    • 5.8.0 RC
    • 5.8.0 Alpha
    • GUI: Text handling
    • None
    • * Ubuntu 16.04
      * Qt from the dev branch; top level commit is ca7708f22eb83d7a1aaaf3503e7727d50678ca1b
    • cc30177a6927ee9619710efec45dbcd9d9fd4355

    Description

      Attached is a small example project. TextEdit subclasses QTextEdit and has the constructor:

      TextEdit::TextEdit()
      {
          insertPlainText("hello");
      
          // Cursor selecting first line
          QTextCursor cursor = textCursor();
          cursor.setPosition(0);
          cursor.movePosition(QTextCursor::EndOfLine, QTextCursor::KeepAnchor);
      
          // ExtraSelection with underline style
          QTextEdit::ExtraSelection selection;
          selection.format.setUnderlineStyle(QTextCharFormat::SingleUnderline);
          selection.cursor = cursor;
      
          setExtraSelections(QList<QTextEdit::ExtraSelection>() << selection);
      }
      

      Build it against Qt 5.7.0 and run - fine, the underline is visible.
      Build it against Qt from the current dev branch - ops, no underline is visible.

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              esabraha Eskil Abrahamsen Blomfeldt
              kosjar Nikolai Kosjar
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes