Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. International
  3. Italian
  4. Elevazione in potenza
Forum Updated to NodeBB v4.3 + New Features

Elevazione in potenza

Scheduled Pinned Locked Moved Unsolved Italian
3 Posts 2 Posters 778 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.
  • _ Offline
    _ Offline
    _DC_
    wrote on last edited by
    #1

    Ciao a tutti ragazzi sono nuovo nel forum, e vorrei il vostro aiuto per risolvere un problema che può sembrare banale ma al momento non sono riuscito a trovare soluzione. Sto Qt con C++, sto plottando un grafico con la classe QCustomPlot, ed in particolare devo inserire le unità di misura sugli assi.
    Ho utilizzato il seguente metodo:

    ui->graph->xAxis->setLabel("cm−1");

    e vorrei visualizzare il -1 all'esponente di cm.
    Qualcuno sa dirmi come fare?
    Vi ringrazio in anticipo 😁

    JonBJ 1 Reply Last reply
    0
    • _ _DC_

      Ciao a tutti ragazzi sono nuovo nel forum, e vorrei il vostro aiuto per risolvere un problema che può sembrare banale ma al momento non sono riuscito a trovare soluzione. Sto Qt con C++, sto plottando un grafico con la classe QCustomPlot, ed in particolare devo inserire le unità di misura sugli assi.
      Ho utilizzato il seguente metodo:

      ui->graph->xAxis->setLabel("cm−1");

      e vorrei visualizzare il -1 all'esponente di cm.
      Qualcuno sa dirmi come fare?
      Vi ringrazio in anticipo 😁

      JonBJ Offline
      JonBJ Offline
      JonB
      wrote on last edited by JonB
      #2

      @_DC_ said in Elevazione in potenza:

      Hi all guys I'm new in the forum, and I would like your help to solve a problem that may seem trivial but at the moment I have not been able to find a solution. I'm Qt with C ++, I'm plotting a chart with the QCustomPlot class, and in particular I have to insert the units of measurement on the axes.
      I used the following method:
      UI-> graph-> xAxis-> setLabel ( "cm-1");
      and I would like to display the -1 to the exponent of cm.
      Can anyone tell me how to do it?
      Thank you in advance 😁

      I do not see that QCPAxis::setLabel ( const QString & str) says it accepts rich text/HTML in str. In that case, I can only think maybe using QCPAxis::setLabelFont ( const QFont & font) if you can find a font a font which has the superscript -1 defined as a character and if you can that character into the str to pass to SetLabel()?

      1 Reply Last reply
      0
      • _ Offline
        _ Offline
        _DC_
        wrote on last edited by
        #3

        I tried to do this but it doesn't work or i'm not able enough. Could you make an example?

        1 Reply Last reply
        0

        • Login

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