QLineSeries Class
La classe QLineSeries rappresenta i dati sotto forma di grafici lineari. Per saperne di più...
| Intestazione: | #include <QLineSeries> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS Graphs) target_link_libraries(mytarget PRIVATE Qt6::Graphs) |
| qmake: | QT += graphs |
| In QML: | LineSeries |
| Eredita da: | QXYSeries |
- Elenco di tutti i membri, compresi quelli ereditati
- QLineSeries fa parte delle classi C++ "Qt Graphs " per il 2D.
Tipi pubblici
(since 6.11) enum class | LineStyle { Straight, StepLeft, StepRight, StepCenter } |
(since 6.11) enum class | StrokeStyle { SolidLine, DashLine } |
Proprietà
|
|
Funzioni pubbliche
| Qt::PenCapStyle | capStyle() const |
| qreal | dashOffset() const |
| QList<qreal> | dashPattern() const |
| QPointF | dataPointCoordinatesAt(qreal x, qreal y) |
| Qt::PenJoinStyle | joinStyle() const |
| QLineSeries::LineStyle | lineStyle() const |
| void | setCapStyle(Qt::PenCapStyle newCapStyle) |
| void | setDashOffset(qreal newDashOffset) |
| void | setDashPattern(const QList<qreal> &pattern) |
| void | setJoinStyle(Qt::PenJoinStyle newJoinStyle) |
| void | setLineStyle(QLineSeries::LineStyle newLineStyle) |
| void | setStrokeStyle(QLineSeries::StrokeStyle newStrokeStyle) |
| void | setWidth(qreal newWidth) |
| QLineSeries::StrokeStyle | strokeStyle() const |
| qreal | width() const |
Segnali
| void | capStyleChanged() |
| void | dashOffsetChanged(qreal newDashOffset) |
| void | dashPatternChanged(const QList<qreal> &newDashPattern) |
| void | joinStyleChanged(Qt::PenJoinStyle newJoinStyle) |
| void | lineStyleChanged(QLineSeries::LineStyle newLineStyle) |
| void | strokeStyleChanged(QLineSeries::StrokeStyle newStrokeStyle) |
| void | widthChanged() |
Descrizione dettagliata
Un grafico lineare viene utilizzato per rappresentare le informazioni come una serie di punti dati collegati da linee rette o da gradini.
Documentazione sul tipo di membro
[since 6.11] enum class QLineSeries::LineStyle
Indica lo stile della linea della serie.
| Costante | Valore | Descrizione |
|---|---|---|
QLineSeries::LineStyle::Straight | 0 | I punti sono collegati da una linea retta. |
QLineSeries::LineStyle::StepLeft | 1 | I punti sono collegati da gradini, dove l'altezza di ciascun gradino corrisponde al valore a sinistra. |
QLineSeries::LineStyle::StepRight | 2 | I punti sono collegati da gradini, in cui l'altezza di ciascun gradino corrisponde al valore a destra. |
QLineSeries::LineStyle::StepCenter | 3 | I punti sono collegati da gradini che variano al centro tra due valori. |
Questa enumerazione è stata introdotta in Qt 6.11.
[since 6.11] enum class QLineSeries::StrokeStyle
Indica lo stile del tratto della serie. Il valore predefinito è StrokeStyle.SolidLine.
| Costante | Valore | Descrizione |
|---|---|---|
QLineSeries::StrokeStyle::SolidLine | Qt::SolidLine | Una linea continua. |
QLineSeries::StrokeStyle::DashLine | Qt::DashLine | Tratti separati da pochi pixel. |
Questa enumerazione è stata introdotta in Qt 6.11.
Documentazione delle proprietà
capStyle : Qt::PenCapStyle
Questa proprietà definisce lo stile del trattino utilizzato per la chiusura delle righe.
Il valore predefinito è Qt.SquareCap.
Funzioni di accesso:
| Qt::PenCapStyle | capStyle() const |
| void | setCapStyle(Qt::PenCapStyle newCapStyle) |
Segnale di notifica:
| void | capStyleChanged() |
[since 6.11] dashOffset : qreal
Questa proprietà contiene l'offset del trattino quando l'opzione " strokeStyle " è impostata su " LineSeries.DashLine".
Questa enumerazione è stata introdotta in Qt 6.11.
Funzioni di accesso:
| qreal | dashOffset() const |
| void | setDashOffset(qreal newDashOffset) |
Segnale Notifier:
| void | dashOffsetChanged(qreal newDashOffset) |
[since 6.11] dashPattern : QList<qreal>
Questa proprietà mantiene il motivo a trattini quando l'opzione " strokeStyle " è impostata su " LineSeries.DashLine".
Questa enumerazione è stata introdotta in Qt 6.11.
Funzioni di accesso:
| QList<qreal> | dashPattern() const |
| void | setDashPattern(const QList<qreal> &pattern) |
Segnale Notifier:
| void | dashPatternChanged(const QList<qreal> &newDashPattern) |
[since 6.11] joinStyle : Qt::PenJoinStyle
Questa proprietà definisce lo stile di unione utilizzato per le estremità delle linee.
Il valore predefinito è ` Qt.BevelJoin`.
Questa enumerazione è stata introdotta in Qt 6.11.
Funzioni di accesso:
| Qt::PenJoinStyle | joinStyle() const |
| void | setJoinStyle(Qt::PenJoinStyle newJoinStyle) |
Segnale Notifier:
| void | joinStyleChanged(Qt::PenJoinStyle newJoinStyle) |
[since 6.11] lineStyle : QLineSeries::LineStyle
Questa proprietà definisce lo stile delle linee utilizzato per il rendering delle linee.
Il valore predefinito è ` LineSeries.Straight`.
Questa enumerazione è stata introdotta in Qt 6.11.
Funzioni di accesso:
| QLineSeries::LineStyle | lineStyle() const |
| void | setLineStyle(QLineSeries::LineStyle newLineStyle) |
Segnale Notifier:
| void | lineStyleChanged(QLineSeries::LineStyle newLineStyle) |
[since 6.11] strokeStyle : QLineSeries::StrokeStyle
Questa proprietà definisce lo stile del tratto della serie.
Il valore predefinito è LineSeries.SolidLine.
Questa enumerazione è stata introdotta in Qt 6.11.
Funzioni di accesso:
| QLineSeries::StrokeStyle | strokeStyle() const |
| void | setStrokeStyle(QLineSeries::StrokeStyle newStrokeStyle) |
Segnale Notifier:
| void | strokeStyleChanged(QLineSeries::StrokeStyle newStrokeStyle) |
width : qreal
Questa proprietà indica la larghezza della linea nella serie.
Questa proprietà contiene lo spessore della penna utilizzato per disegnare la linea della serie.
Funzioni di accesso:
| qreal | width() const |
| void | setWidth(qreal newWidth) |
Segnale di notifica:
| void | widthChanged() |
Documentazione delle funzioni membro
[invokable] QPointF QLineSeries::dataPointCoordinatesAt(qreal x, qreal y)
Restituisce le coordinate di rendering di x e y convertite in coordinate dei punti dati.
Nota: questa funzione può essere richiamata tramite il sistema dei meta-oggetti e da QML. Vedi Q_INVOKABLE.
© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.