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

ExtraSelection with underline not visible

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: P1: Critical 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

      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.

        For Gerrit Dashboard: QTBUG-54626
        # Subject Branch Project Status CR V

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

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes