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. Generating PY from QRC Everytime a Resource file changes
Forum Update on Monday, May 27th 2025

Generating PY from QRC Everytime a Resource file changes

Scheduled Pinned Locked Moved Unsolved Qt for Python
4 Posts 3 Posters 361 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.
  • R Offline
    R Offline
    respect88
    wrote on 27 Nov 2020, 17:28 last edited by respect88
    #1

    I have to manually run the command ("pyside2-rcc -o output.py input.qrc") to generate a new PY module from my QRC file every time a resource file changes that depends on my QRC. This is becoming super tedious. I am using QT Creator, is there some tool in QTCreator or something else that can watch for changes and run the pyside2-rcc command for me?

    J 1 Reply Last reply 27 Nov 2020, 17:51
    0
    • R respect88
      27 Nov 2020, 17:28

      I have to manually run the command ("pyside2-rcc -o output.py input.qrc") to generate a new PY module from my QRC file every time a resource file changes that depends on my QRC. This is becoming super tedious. I am using QT Creator, is there some tool in QTCreator or something else that can watch for changes and run the pyside2-rcc command for me?

      J Offline
      J Offline
      JonB
      wrote on 27 Nov 2020, 17:51 last edited by JonB
      #2

      @respect88
      I am guessing you have not set up in Creator/build environment correctly. I see an old post at https://stackoverflow.com/questions/22508491/a-py-file-which-compiled-from-qrc-file-using-pyside-rcc-does-not-work for old PySide1, but does it give steps to check work for you?

      1 Reply Last reply
      0
      • R Offline
        R Offline
        respect88
        wrote on 27 Nov 2020, 18:09 last edited by respect88
        #3

        No, this did not help me. I don't see any steps for how to automate the pyside2-rcc command when a file listed in the QRC changes.

        1 Reply Last reply
        0
        • P Offline
          P Offline
          pmc1
          wrote 27 days ago last edited by
          #4

          I made a batch script that I run every time I detect that the .qrc (or .ui) files have changed. It's all automated before launching the application.

          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