Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QtCharts QCategoryAxis category label with 'smaller than' sign
Qt 6.11 is out! See what's new in the release blog

QtCharts QCategoryAxis category label with 'smaller than' sign

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 416 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • JanWJ Offline
    JanWJ Offline
    JanW
    wrote on last edited by
    #1

    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

    1 Reply Last reply
    0
    • AndySA Offline
      AndySA Offline
      AndyS
      Moderators
      wrote on last edited by
      #2

      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.

      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      2

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved