PyQtChart crash

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

PyQtChart crash

Maxime Lemonnier
Hi, there seems to be a problem with latest pip versions of PyQtChart/PyQt5 (5.12). It was working fine with 5.9 iirc.

Thank you very much!

------------- main.py ----------------
import sys

from PyQt5.QtCore import QUrl
from PyQt5.QtGui import QGuiApplication
from PyQt5.QtQuick import QQuickView


if __name__ == '__main__':
    app = QGuiApplication(sys.argv)
    view = QQuickView()
    view.setSource( QUrl.fromLocalFile('whatever.qml') )
    view.show()
    QGuiApplication.processEvents()
    print('end') #<---- will never reach here!

------------- whatever.qml --------------
import QtQuick 2.5
import QtCharts 2.3

Rectangle
{
    height: 800
    width: 800
    color: "blue"

        ChartView {
        title: "Line"
        anchors.fill: parent
        antialiasing: true

        LineSeries {
            name: "LineSeries"
            XYPoint { x: 0; y: 0 }
            XYPoint { x: 1.1; y: 2.1 }
            XYPoint { x: 1.9; y: 3.3 }
            XYPoint { x: 2.1; y: 2.1 }
            XYPoint { x: 2.9; y: 4.9 }
            XYPoint { x: 3.4; y: 3.0 }
            XYPoint { x: 4.1; y: 3.3 }
        }
    }
}

_______________________________________________
PyQt mailing list    [hidden email]
https://www.riverbankcomputing.com/mailman/listinfo/pyqt
Reply | Threaded
Open this post in threaded view
|

Re: PyQtChart crash

Maxime Lemonnier
Forget it, PyDev was misconfigured. the crash did not happend in console. sorry for the trouble.

On Thu, Feb 28, 2019 at 5:02 PM Maxime Lemonnier <[hidden email]> wrote:
Hi, there seems to be a problem with latest pip versions of PyQtChart/PyQt5 (5.12). It was working fine with 5.9 iirc.

Thank you very much!

------------- main.py ----------------
import sys

from PyQt5.QtCore import QUrl
from PyQt5.QtGui import QGuiApplication
from PyQt5.QtQuick import QQuickView


if __name__ == '__main__':
    app = QGuiApplication(sys.argv)
    view = QQuickView()
    view.setSource( QUrl.fromLocalFile('whatever.qml') )
    view.show()
    QGuiApplication.processEvents()
    print('end') #<---- will never reach here!

------------- whatever.qml --------------
import QtQuick 2.5
import QtCharts 2.3

Rectangle
{
    height: 800
    width: 800
    color: "blue"

        ChartView {
        title: "Line"
        anchors.fill: parent
        antialiasing: true

        LineSeries {
            name: "LineSeries"
            XYPoint { x: 0; y: 0 }
            XYPoint { x: 1.1; y: 2.1 }
            XYPoint { x: 1.9; y: 3.3 }
            XYPoint { x: 2.1; y: 2.1 }
            XYPoint { x: 2.9; y: 4.9 }
            XYPoint { x: 3.4; y: 3.0 }
            XYPoint { x: 4.1; y: 3.3 }
        }
    }
}

_______________________________________________
PyQt mailing list    [hidden email]
https://www.riverbankcomputing.com/mailman/listinfo/pyqt