Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Super Confused. Trying to develop a Qt Gui using Python3 and PySide6. Need some clarification.
Forum Updated to NodeBB v4.3 + New Features

Super Confused. Trying to develop a Qt Gui using Python3 and PySide6. Need some clarification.

Scheduled Pinned Locked Moved Unsolved General and Desktop
7 Posts 3 Posters 2.3k Views 2 Watching
  • 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.
  • G Offline
    G Offline
    Guy1195
    wrote on last edited by
    #1

    So I'll start out by saying I'm completely new to Qt, I've made an app using PyQt5 and Qt Designer, but trying to move over to PySide6 and Qt Creator to use QML and all the new fancy stuff in the Creator. The amount of Qt names and abbreviations just get me confused to oblivion though.

    I am developing using a win10 x64 PC with Qt Creator 4.14.2 Community edition, I have installed Python3 and also PySide6 via pip.
    The end device is a Raspberry Pi 4 running archlinuxarm 64 bit with Python3 and pyside6 6.0.4-1 installed via pacman.

    I opened Qt Creator and imported the QtQuick.Extras 1.4, dragged on a couple of Gauges and tried to run using Build > Run.

    I get an error saying import QtQuick.Extras 1.4 failed, as QtQuick.Extras is not installed. I'm struggling to understand what's going on here haha as the folder is clearly there within the Qt directory, the module is imported in the creator and I can see/drag on all the QML types?

    From searching about, I've read "It doesn't matter about the folders in the Qt Creator directory, those are just for the creator, it matters on how your Qt setup is installed" but this just makes no sense to me haha? Surely the build>run would use the qt creator directory? The main.py uses 'import PySide6' but then the view.qml uses 'import QtQuick'? Is this meant to be or can I change the Qt Creator to make the .qmls use pyside?

    Could someone try clarify this for me and just some sort of general overview haha.. I know there is a wiki and documentation, but there is just so much it's hard to take it all in at once.

    1 Reply Last reply
    0
    • mrdebugM Offline
      mrdebugM Offline
      mrdebug
      wrote on last edited by
      #2

      If I can say a personal opinion, please don't use python and Qt. Please use c++ - qml - Qt. This scenario is very simple and portable without problems between windows and Linux on raspberry.
      When you will have more experience you can try python and Qt and you will find the solution on every problem alone.

      Need programmers to hire?
      www.labcsp.com
      www.denisgottardello.it
      GMT+1
      Skype: mrdebug

      G 1 Reply Last reply
      0
      • mrdebugM mrdebug

        If I can say a personal opinion, please don't use python and Qt. Please use c++ - qml - Qt. This scenario is very simple and portable without problems between windows and Linux on raspberry.
        When you will have more experience you can try python and Qt and you will find the solution on every problem alone.

        G Offline
        G Offline
        Guy1195
        wrote on last edited by
        #3

        @mrdebug Even that's just more confusing than Python version lol. The Qt Online installer doesn't seem to have any options for an Arm setup. And the open source Qt creator doesn't seem to have any compiler installed for C++ projects.

        There doesn't seem to be any instructions for installing and using Qt on windows with the end device being Linux on ARM.

        1 Reply Last reply
        0
        • Kent-DorfmanK Offline
          Kent-DorfmanK Offline
          Kent-Dorfman
          wrote on last edited by Kent-Dorfman
          #4

          In contrast to other posted opinions I've gound that the pyqt bindings to Qt allow me to produce quick and effective proof-of-concept designs.

          1. design some screens using qt-designer
          2. pyqt5 < screen.ui > screen.py
          3. subclass screen using setupUi()
          4. create backend python code

          If you meet the AI on the road, kill it.

          G 1 Reply Last reply
          0
          • mrdebugM Offline
            mrdebugM Offline
            mrdebug
            wrote on last edited by
            #5

            In order to develop for raspberry pi (I have a lot of some Qt projects for it) it is not necessary to use a toolchain. You just have to write the application on Windows.
            If you haven't got to manage external libraries (for gpio for example) when your software is done you just have to copy the sources in a raspberry pi ant compile them.
            In raspberry pi you can use the Raspbian Qt framework or you can install it from sources.
            Another way is to use yocto with a toolchain. This scenario is very cool but I use it only for a projects that can run only in the target machine.

            Need programmers to hire?
            www.labcsp.com
            www.denisgottardello.it
            GMT+1
            Skype: mrdebug

            G 1 Reply Last reply
            0
            • mrdebugM mrdebug

              In order to develop for raspberry pi (I have a lot of some Qt projects for it) it is not necessary to use a toolchain. You just have to write the application on Windows.
              If you haven't got to manage external libraries (for gpio for example) when your software is done you just have to copy the sources in a raspberry pi ant compile them.
              In raspberry pi you can use the Raspbian Qt framework or you can install it from sources.
              Another way is to use yocto with a toolchain. This scenario is very cool but I use it only for a projects that can run only in the target machine.

              G Offline
              G Offline
              Guy1195
              wrote on last edited by
              #6

              @mrdebug Ahh okay i didn't think about compiling on the raspberry pi itself! Good idea. I will look into how to do this.

              1 Reply Last reply
              0
              • Kent-DorfmanK Kent-Dorfman

                In contrast to other posted opinions I've gound that the pyqt bindings to Qt allow me to produce quick and effective proof-of-concept designs.

                1. design some screens using qt-designer
                2. pyqt5 < screen.ui > screen.py
                3. subclass screen using setupUi()
                4. create backend python code
                G Offline
                G Offline
                Guy1195
                wrote on last edited by
                #7

                @Kent-Dorfman Yes i agree, i had no issues with pyqt/pyside. I just wasn't 100% on how to use QML with pyside/pyqt as i couldn't really find any tutorials on it. I wanted to use QT Creator instead of the older QT Designer for making the QML, and then python backend which i already had.

                My previous workflow was to just design the .ui and use pycui, copy the .py generated code to the Pi and i had a second load script which assigned all the clicked events to buttons etc. It worked fine, but i never knew or could find a good guide on using qml, although i have actually got it to work before and display some example qml, but i didn't really know what was going on haha!

                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