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

need more detail information for function QLineF::setLength() in document

    XMLWordPrintable

Details

    • 1575462bf90851fb134db4892e93c04b396543f1

    Description

      Suggestion:
      For function void QLineF::setLength ( qreal length ) ,
      In the document, didn't metion about if length is a negative value, effect the angle value or not.

      Source code:
      QLineF line = QLineF(0, 0, 1.0, 1.0);
      qDebug(QString::number(line.angle()).toLatin1());
      line.setLength(-2);
      qDebug(QString("Output p2 = (" + QString::number(line.p2().x()) + ",\t" + QString::number(line.p2().y()) + ")").toLatin1());
      qDebug(QString::number(line.angle()).toLatin1());

      Output:
      315
      Output p2 = (-1.41421, -1.41421)
      135

      Reason:
      In the document, didn't metion about if length is a negative value, effect the angle value or not.

      Attachments

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

        Activity

          People

            cvandonderen Casper van Donderen
            delongyang DelongYang
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes