QPen output description?
-
Hi, I construct a
QPenasQPen myPen{QBrush{QColor{100, 0, 0}}, 1.5, Qt::SolidLine}when I try to get the output of this usingqDebug() << myPenthis is what I get:QPen(2,QBrush(QColor(ARGB 1, 0.392157, 0, 0),SolidPattern),SolidLine,16,64,QVector(),0,2)I think I understand the part
QPen(2,QBrush(QColor(ARGB 1, 0.392157, 0, 0),SolidPattern),SolidLine, ...:2is thewidth()(but why is it2i.e. an interger and not1.5as I put it in the constructor? it should give me thewidthF()otherwise the representation of theQPenin the output is wrong)QBrush(QColor(ARGB 1, 0.392157, 0, 0),SolidPattern)theQBrushin ARGB patternSolidLineis because I usedQt::SolidLinein the constructor
But what is the
...16,64,QVector(),0,2)part? In theQPenclass description the most complete way to construct a pen isQPen(const QBrush &brush, qreal width, Qt::PenStyle style = Qt::SolidLine, Qt::PenCapStyle cap = Qt::SquareCap, Qt::PenJoinStyle join = Qt::BevelJoin)So, what does the values
...16,64,QVector(),0,2)correspond to and why my pen width is not represented correctly in output? -
Simply look at the source which parameters are used for the debug output: https://code.woboq.org/qt5/qtbase/src/gui/painting/qpen.cpp.html#_ZlsR11QDataStreamRK4QPen
-
Simply look at the source which parameters are used for the debug output: https://code.woboq.org/qt5/qtbase/src/gui/painting/qpen.cpp.html#_ZlsR11QDataStreamRK4QPen
@Christian-Ehrlicher Thanks :)