Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Issues with QtQuick Controls with on PySide 6
Forum Updated to NodeBB v4.3 + New Features

Issues with QtQuick Controls with on PySide 6

Scheduled Pinned Locked Moved Solved QML and Qt Quick
4 Posts 2 Posters 1.1k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    teabag
    wrote on last edited by teabag
    #1

    I had a project on PySide2, which worked just fine until I decided to install PySide6. After fixing most of the stuff I started getting the very unhelpful error messages:

    • The program has unexpectedly finished.
    • The process was ended forcefully.
    • /Library/Frameworks/Python.framework/Versions/3.9/bin/python3 crashed.

    I didn't really see anything wrong with the project, so I created a blank project which worked just fine. However, same messages as above appeared as soon as I added some controls (e.g. button), which I believe to be the source of the issue.

    I'm running the following:

    • MacOS Big Sur 11.5.2 (latest)
    • Python 3.9.6
    • PySide 6.1.2

    I installed Qt using the online installer with the following options selected:

    • Design Tools (Qt Design Studio)
    • Qt 6.1 for desktop development (Qt libraries for clang)

    Here are some example files:

    main.qml

    import QtQuick
    import QtQuick.Window
    import QtQuick.Layouts
    import QtQuick.Controls
    
    Window {
        width: 640
        height: 480
        visible: true
        title: qsTr("Hello World")
    
        RowLayout {
            id: rowLayout
            anchors.fill: parent
    
            Button {
                id: btn
            }
    
        }
    
    }
    

    main.py

    import os
    from pathlib import Path
    import sys
    
    from PySide6.QtGui import QGuiApplication
    from PySide6.QtQml import QQmlApplicationEngine
    
    
    if __name__ == "__main__":
        app = QGuiApplication(sys.argv)
        engine = QQmlApplicationEngine()
        engine.load(os.fspath(Path(__file__).resolve().parent / "main.qml"))
        if not engine.rootObjects():
            sys.exit(-1)
        sys.exit(app.exec())
    

    main.pyproject

    {
        "files": ["main.py", "main.qml"]
    }
    
    1 Reply Last reply
    0
    • T Offline
      T Offline
      teabag
      wrote on last edited by
      #4

      Found the source of the issue. There must have been a conflict with my Python installs - I had both the one from the website and one with Homebrew. I completely removed both and then reinstalled with Homebrew and all seems to be working fine now.

      1 Reply Last reply
      0
      • ndiasN Offline
        ndiasN Offline
        ndias
        wrote on last edited by
        #2

        No problems detected on my side running your sample code using:

        • Windows 10 (x64)
        • Python 3.7.7 (x64)
        • PySide 6.1.2
        1 Reply Last reply
        0
        • T Offline
          T Offline
          teabag
          wrote on last edited by
          #3

          I believe it might be a Mac related issue. Found the same thing on stack overflow - https://stackoverflow.com/questions/66492343/pyside6-comes-with-segmentation-fault-on-mac

          1 Reply Last reply
          0
          • T Offline
            T Offline
            teabag
            wrote on last edited by
            #4

            Found the source of the issue. There must have been a conflict with my Python installs - I had both the one from the website and one with Homebrew. I completely removed both and then reinstalled with Homebrew and all seems to be working fine now.

            1 Reply Last reply
            0

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved