[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    [PyQt] PyQtChart crash
From:       Maxime Lemonnier <maxime.lemonnier () gmail ! com>
Date:       2019-02-28 22:02:44
Message-ID: CAK_=Pd3_EQzUXg1GSYdHZHhYBQ0M3wBAaFWF6uityDZiv4-YHw () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


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 }
        }
    }
}

[Attachment #5 (text/html)]

<div dir="ltr"><div dir="ltr"><div dir="ltr">Hi, there seems to be a problem with \
latest pip versions of PyQtChart/PyQt5 (5.12). It was working fine with 5.9 \
iirc.</div><div dir="ltr"><br></div><div dir="ltr">Thank you very \
much!<br><div><br></div><div><div>------------- main.py \
----------------</div><div>import sys</div><div><br></div><div>from PyQt5.QtCore \
import QUrl</div><div>from PyQt5.QtGui import QGuiApplication</div><div>from \
PyQt5.QtQuick import QQuickView</div><div><br></div><div><br></div><div>if __name__ \
== &#39;__main__&#39;:</div><div>      app = QGuiApplication(sys.argv)</div><div>     \
view = QQuickView()</div><div>      view.setSource( \
QUrl.fromLocalFile(&#39;whatever.qml&#39;) )</div><div>      view.show()</div><div>   \
QGuiApplication.processEvents()</div><div>      print(&#39;end&#39;) #&lt;---- will \
never reach here!</div></div><div><br></div><div>------------- whatever.qml \
--------------</div><div><div>import QtQuick 2.5</div><div>import QtCharts \
2.3</div><div><br></div><div>Rectangle</div><div>{</div><div>      height: \
800</div><div>      width: 800</div><div>      color: \
&quot;blue&quot;</div><div><br></div><div>            ChartView {</div><div>          \
title: &quot;Line&quot;</div><div>            anchors.fill: parent</div><div>         \
antialiasing: true</div><div><br></div><div>            LineSeries {</div><div>       \
name: &quot;LineSeries&quot;</div><div>                  XYPoint { x: 0; y: 0 \
}</div><div>                  XYPoint { x: 1.1; y: 2.1 }</div><div>                  \
XYPoint { x: 1.9; y: 3.3 }</div><div>                  XYPoint { x: 2.1; y: 2.1 \
}</div><div>                  XYPoint { x: 2.9; y: 4.9 }</div><div>                  \
XYPoint { x: 3.4; y: 3.0 }</div><div>                  XYPoint { x: 4.1; y: 3.3 \
}</div><div>            }</div><div>      }</div><div>}</div></div></div></div></div>


[Attachment #6 (text/plain)]

_______________________________________________
PyQt mailing list    PyQt@riverbankcomputing.com
https://www.riverbankcomputing.com/mailman/listinfo/pyqt


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic