Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

segfault when using QtCharts #19

Open
joaoantoniocardoso opened this issue Apr 19, 2021 · 3 comments · May be fixed by #28
Open

segfault when using QtCharts #19

joaoantoniocardoso opened this issue Apr 19, 2021 · 3 comments · May be fixed by #28

Comments

@joaoantoniocardoso
Copy link

Hi!

I was running qhot main.qml in my project and everything was going fine until I started to work with QtCharts 2.3:

> qhot main.qml        
qrc:/main.qml:104:5: QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo(<arguments>) { ... }
[1]    537113 segmentation fault (core dumped)  qhot main.qml

Here is a minimal code example to reproduce the bug:

import QtQuick 2.15
import QtCharts 2.3

Rectangle {
    color: "red"
    ChartView { }
}

Then it runs if I comment out ChartView { }.

Besides that, I can normally run my application binary.

I am using Arch Linux (updated) with the current qt5 package group.

Thanks!

@emimvi
Copy link

emimvi commented Jul 2, 2024

Also hit this issues, both in qhot and my own app. Seems like QtCharts uses QWidgets internally, and thus needs a full QApplication instead of QGuiApplication. Patching qhot to use QApplication and requiring the Widgets component in the CMakeLists works for me.

@joaoantoniocardoso
Copy link
Author

joaoantoniocardoso commented Jul 2, 2024

Also hit this issues, both in qhot and my own app. Seems like QtCharts uses QWidgets internally, and thus needs a full QApplication instead of QGuiApplication. Patching qhot to use QApplication and requiring the Widgets component in the CMakeLists works for me.

Could you make a draft/PR with those changes?

@emimvi emimvi linked a pull request Jul 2, 2024 that will close this issue
@emimvi
Copy link

emimvi commented Jul 2, 2024

@joaoantoniocardoso Not sure if you got a notification for it, but I added a PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants