Unsolved newline in QDateTimeAxis::setFormat
-
How do you express newline in QDateTimeAxis::setFormat function?
-
Do you mean like
QDateTimeAxis *axisX = new QDateTimeAxis;
axisX->setFormat("dd-MM-yyyy h:mm");
chartView->chart()->setAxisX(axisX, series);It uses the format from
http://doc.qt.io/qt-5/qdatetime.htmlAnd there is no concept of new line so
not sure its possible if its given
directly to a QDateTime class.What did u try ?
-
Yes.
Didn't find newline in the document.
Tried \n and \\n
Any thought on alternatives enabling newline in the format?
-
Im not sure it can contain newline or any other char that is not
part of the format.Can I ask why you try to insert newline?
-
To present information in confined space.
Is it possible to have the datetime axis in a hierarchical format such as the one below?
-
try <br> it worked for me
-
@Henrik-Rasmussen Thanks, that helped!