Issue Description
The legend icon is not displayed as expected. Instead of a line, the icon appears as a small square in the top-left corner of the icon rectangle area.
This issue occurs in a clean environment with only PythonQwt 0.15.0 and PyQt6 6.8.1 installed.
The problem probably occurs during the creation of the QwtGraphic (of the icon) or in converting it to a pixmap using the QwtGraphic.toPixmap() method
Location
(Not sure)
File: plot_curve.py or graphic.py
Method: QwtPlotCurve.LegendIcon or QwtGraphic.toPixmap
Impact
This issue prevents users from visually distinguishing between different plot curves in the legend, as the legend icon does not accurately represent the curve style. It reduces the clarity and usability of plots, especially in cases with multiple curves, making it difficult to interpret the plot data from the legend.
Additional Context
This bug likely appeared after updating PyQt6 to version 6.7 or 6.8.