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. Pyside6: generate and save Python code automatically in Designer when saving UI
Forum Updated to NodeBB v4.3 + New Features

Pyside6: generate and save Python code automatically in Designer when saving UI

Scheduled Pinned Locked Moved Solved Qt for Python
4 Posts 2 Posters 1.4k 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.
  • R Offline
    R Offline
    redtide
    wrote on 16 Mar 2024, 09:45 last edited by
    #1

    I have this working in QtCreator, which is my current universal C++ IDE, but sometimes I use Qt Designer with other tools like VSCode and some people I know uses it, but can't see a way to update automatically the .py generated file from the .ui like QtC does.

    Is there some option to automate the process with Qt Designer or is the only way by saving manually from menu Form -> View Python Code and Save?

    J 1 Reply Last reply 16 Mar 2024, 10:18
    0
    • R Offline
      R Offline
      redtide
      wrote on 17 Mar 2024, 09:24 last edited by
      #4

      Designer only saves the .ui file. You need to run pyside6-uic to convert that to the .py file.

      It seems you didn't read entirely the OP, it does, from the Form menu, the only annoying issue is that it's not automatic when saving the ui for obvious reasons.

      So probably I could make a designer plugin that does it, regardless to the IDE editor used.
      There are some limitation in Designer plugins that makes this less useful than the current option.

      1 Reply Last reply
      0
      • R redtide
        16 Mar 2024, 09:45

        I have this working in QtCreator, which is my current universal C++ IDE, but sometimes I use Qt Designer with other tools like VSCode and some people I know uses it, but can't see a way to update automatically the .py generated file from the .ui like QtC does.

        Is there some option to automate the process with Qt Designer or is the only way by saving manually from menu Form -> View Python Code and Save?

        J Offline
        J Offline
        JonB
        wrote on 16 Mar 2024, 10:18 last edited by
        #2

        @redtide
        Designer only saves the .ui file. You need to run pyside6-uic to convert that to the .py file. Creator does this for you when you "build" or whatever. I don't know how vscode works, but if you can run an OS command like that from there you would be good.

        R 1 Reply Last reply 16 Mar 2024, 13:55
        0
        • J JonB
          16 Mar 2024, 10:18

          @redtide
          Designer only saves the .ui file. You need to run pyside6-uic to convert that to the .py file. Creator does this for you when you "build" or whatever. I don't know how vscode works, but if you can run an OS command like that from there you would be good.

          R Offline
          R Offline
          redtide
          wrote on 16 Mar 2024, 13:55 last edited by
          #3

          @JonB thank you for the quick reply!
          So probably I could make a designer plugin that does it, regardless to the IDE editor used.

          1 Reply Last reply
          0
          • R Offline
            R Offline
            redtide
            wrote on 17 Mar 2024, 09:24 last edited by
            #4

            Designer only saves the .ui file. You need to run pyside6-uic to convert that to the .py file.

            It seems you didn't read entirely the OP, it does, from the Form menu, the only annoying issue is that it's not automatic when saving the ui for obvious reasons.

            So probably I could make a designer plugin that does it, regardless to the IDE editor used.
            There are some limitation in Designer plugins that makes this less useful than the current option.

            1 Reply Last reply
            0
            • R redtide has marked this topic as solved on 17 Mar 2024, 09:25

            1/4

            16 Mar 2024, 09:45

            • Login

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