Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt for Python
  4. Develop a PySide application in QtCreator
Forum Updated to NodeBB v4.3 + New Features

Develop a PySide application in QtCreator

Scheduled Pinned Locked Moved Unsolved Qt for Python
6 Posts 3 Posters 1.9k Views 1 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.
  • V Offline
    V Offline
    vlada
    wrote on last edited by
    #1

    Hi,

    I'd like to develop a PySide application in QtCreator but I'm not sure if it is a good idea or not. In the end I'd like to have a standalone tool. I found out that the best possibility is currently probably using fbs. But it seems to me it can not be really integrated in QtCreator.

    What would you suggest? Currently I do the GUI in QtCreator and then separately write the Python code and run it using fbs. Is there a better solution? Are there any plans for the future? Thank you.

    JonBJ 1 Reply Last reply
    0
    • V vlada

      Hi,

      I'd like to develop a PySide application in QtCreator but I'm not sure if it is a good idea or not. In the end I'd like to have a standalone tool. I found out that the best possibility is currently probably using fbs. But it seems to me it can not be really integrated in QtCreator.

      What would you suggest? Currently I do the GUI in QtCreator and then separately write the Python code and run it using fbs. Is there a better solution? Are there any plans for the future? Thank you.

      JonBJ Online
      JonBJ Online
      JonB
      wrote on last edited by
      #2

      @vlada
      Latest project I am working on uses Qt Creator just for UI, shell script for pyuic export, and VSCode for Python/PySide2 development. Cannot comment on how that compares to your integrated solution, but it works.

      Meanwhile, I looked at your fbs. Have you noted:

      You can use fbs for free in open source projects that are licensed under the GPL. If you don't want to open your code up to the public, you can purchase a commercial license for EUR 449 per developer:

      Note that GPL, instead of LGPL, requires you to publish your own source code. Just saying.

      1 Reply Last reply
      1
      • V Offline
        V Offline
        vlada
        wrote on last edited by
        #3

        @JonB Thank you, I haven't noticed that part about GPL. I probably wouldn't have a problem with GPL since I only plan to share the app with my colleagues and they can have the source code.

        But it would be better to have a solution where I don't have to comply with GPL. Have you tried cx_freeze or py2exe? Last time I tried them, they didn't work with PySide 2.

        1 Reply Last reply
        0
        • JonBJ Online
          JonBJ Online
          JonB
          wrote on last edited by JonB
          #4

          Nope, but this will need looking into in due course. Doesn't windeployqt /linuxdeployqt work for us with PySide2? There must be a best answer for this? Folks on this forum probably know, if they see this.

          EDIT Maybe not. From 4 years ago someone was saying

          I've never used windeployqt before, but I have deployed some PyQt and PySide apps to Windows before.

          My usual setup is to use py2exe or cx_Freeze. There is a weird bug with PyQt4 and py2exe, so I'd recommend cx_Freeze as that's what I've switched over to now. Also cx_Freeze's support of bdist_msi is awesome and takes a huge amount of the deployment worries away!

          EDIT 2
          OK, what's this: https://doc.qt.io/qtforpython/deployment-pyinstaller.html ? New? Official looking?

          Ahh, we both need to start reading from https://doc.qt.io/qtforpython/deployment.html, have you seen that?

          1 Reply Last reply
          1
          • V Offline
            V Offline
            vlada
            wrote on last edited by vlada
            #5

            @JonB This is great. The documentation must be pretty new. I don't remember seeing it before and I really searched for it. I will study it and hopefully I will find a well working solution.

            @Denni-0 Thanks a lot for your suggestions. I already found out that using QtCreator for Python is not a good solution (at least yet). I like using it for multiplatform C++ applications.

            Currently my workflow is following:

            1. Design simple UI in the Designer, if it had to be more complicated, I will definitely use a different approach (like I do for my other apps)
            2. Compile resources to Python code
            3. Write the rest of the code in a Python IDE (I prefer PyScripter)
            4. "Compile" the code

            Regarding the step 4), I'm not sure, what is the best solution (cx_freeze, py2exe, PyInstaller). I'm not sure if I can use fbs because of it's license. So I won't rather rely on it.

            What would you suggest as the best method to create a standalone application? In the old days of first PySide based on Qt4 I used py2exe, but it seems it is not actively developed anymore.

            1 Reply Last reply
            0
            • V Offline
              V Offline
              vlada
              wrote on last edited by
              #6

              @Denni-0 I agree with you. I never used the Designer until now. I just wanted to give it a try and see myself if it makes sense to use it or not. For a very simple UI, I would say yes, but as soon as you need to extend your application, it will be a blocker.

              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