Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
QtCharts QCategoryAxis category label with 'smaller than' sign
-
Hi,
I have a problem when I try to add a category label which has a 'smaller than' sign. It works with a greater than or equal sign, but not with the smaller than.
The corresponding code is (uncomment the lines to try the corresponding sign in unicode notation):
xAxis = new QtCharts::QCategoryAxis(); (qobject_cast<QtCharts::QCategoryAxis*>(xAxis))->setStartValue(-1150.0f); (qobject_cast<QtCharts::QCategoryAxis*>(xAxis))->append("-1150 to -950", -950.0f); (qobject_cast<QtCharts::QCategoryAxis*>(xAxis))->append("-950 to -850", -850.0f); (qobject_cast<QtCharts::QCategoryAxis*>(xAxis))->append("-850 to -750", -750.0f); (qobject_cast<QtCharts::QCategoryAxis*>(xAxis))->append(QString::fromUtf8(">-750 or \u003C -1150"), -550.0f); //(qobject_cast<QtCharts::QCategoryAxis*>(xAxis))->append(QString::fromUtf8(">-750 or \u003D -1150"), -550.0f); //(qobject_cast<QtCharts::QCategoryAxis*>(xAxis))->append(QString::fromUtf8(">-750 or \u003E -1150"), -550.0f); xAxis->setMin(-1150.0f); xAxis->setMax(-550.0f);
When I use the smaller then sign, the label just stops before the sign (so the label is "->750 or "), with the other signs it shows correct (so the label is "->750 or > -1250" or "->750 or = -1150").
Anybody has an idea why or has a workaround?
Regards,Jan
-
Hi @JanW,
This sounds like a bug. Can you open a bug on JIRA with an example so that this can be investigated further? Thanks.