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

QPlainTextEdit - document()->size() does not return the document size

    XMLWordPrintable

Details

    • Bug
    • Resolution: Out of scope
    • P3: Somewhat important
    • None
    • 4.7.1
    • GUI: Text handling
    • None

    Description

      The height returned the number of lines instead of the height of the document.
      The width returned an undefine value.

      #include <QtGui>
      int main(int argc, char *argv[])
      {
          QApplication a(argc, argv);
          QPlainTextEdit TextWin;
          TextWin.setPlainText("this is a test \n Hello Hello Hello Hello\n World");
          TextWin.show();
          qDebug() << TextWin.document()->size()
      }
      

      When QTextEdit is used instead of QPlainTextEdit, the size returned is correct.

      Attachments

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

        Activity

          People

            esabraha Eskil Abrahamsen Blomfeldt
            sanonymous Nokia Qt Support (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes