Details
-
Suggestion
-
Resolution: Won't Do
-
P4: Low
-
None
-
all
-
None
Description
It'd be helpful to have a Python version of the code for subclassing QValue3DAxisFormatter added to:
https://doc.qt.io/qtforpython/examples/index.html#datavisualization
There is currently this one:Qt Quick 2 Axis Formatter Example - Qt for Python, but it doesn't appear to all be Python code or runnable in any way.
In particular, the documented access and modification of gridPositions(), labelPositions(), and labelStrings() does not work:
gridPositions().resize(gridCount)
.....
gridPositions()[i] = float(gridValue)
labelPositions()[i] = float(gridValue)
labelStrings() << minFullDate.addDays.toString(axis().labelFormat())
In Python, each of the methods on the left (if prepended with 'self.') returns a list that cannot be modified or assigned anything nor has a resize method. The code seems to be mixed with direct copy from the C++ example found at [Qt Quick 2 Axis Formatter Example | Qt Data Visualization 5.15.10|https://doc.qt.io/qt-5/qtdatavisualization-qmlaxisformatter-example.html#custom-axis-formatter].
QList<float> &QValue3DAxisFormatter::gridPositions() const QList<float> &QValue3DAxisFormatter::labelPositions() const QStringList &QValue3DAxisFormatter::labelStrings() const
Attachments
Issue Links
- relates to
-
PYSIDE-2019 Python code for QValue3DAxisFormatter for non-QML chart
- Closed
For Gerrit Dashboard: PYSIDE-2025 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
425801,6 | Enable modifying the lists returned by QValue3DAxisFormatter | dev | pyside/pyside-setup | Status: ABANDONED | 0 | 0 |
430287,6 | Add setters for the the lists in QValue3DAxisFormatter | dev | pyside/pyside-setup | Status: MERGED | +2 | 0 |
430375,7 | shiboken6: Fix documentation injection for added functions with parameter names | dev | pyside/pyside-setup | Status: MERGED | +2 | 0 |
430578,2 | shiboken6: Move some fields of TypeEntry to derived classes | dev | pyside/pyside-setup | Status: MERGED | +2 | 0 |
430579,2 | shiboken6: Split the document modifications in ComplexTypeEntry | dev | pyside/pyside-setup | Status: MERGED | +2 | 0 |
430593,2 | shiboken6: Split AddedFunction from modifications | dev | pyside/pyside-setup | Status: MERGED | +2 | 0 |