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. could pyside6-rcc compile .qrc to .rcc ?
QtWS25 Last Chance

could pyside6-rcc compile .qrc to .rcc ?

Scheduled Pinned Locked Moved Unsolved Qt for Python
10 Posts 4 Posters 2.0k 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.
  • EbyZeroE Offline
    EbyZeroE Offline
    EbyZero
    wrote on last edited by EbyZero
    #1

    I am using python 3.9.7, pyside 6.2.1.
    I ran the following command.

    pyside6-rcc --binary some.qrc -o some.rcc
    

    Then I got some.rcc but it was not a binary file. The contents of the file equalled to a file created by pyside6-rcc without --binarny option, likes some.py file.
    Maybe I did not input arguments to pyside6-rcc properly. How could I get binary .rcc file..?

    it's delicious!

    JonBJ 1 Reply Last reply
    0
    • EbyZeroE Offline
      EbyZeroE Offline
      EbyZero
      wrote on last edited by
      #2

      I tried rcc.exe (in the package directory, not pyside6-rcc) to compile a binary and succeeded. There might be something differences between rcc.exe and pyside6-rcc.exe. Please let me know differences.

      it's delicious!

      1 Reply Last reply
      0
      • EbyZeroE EbyZero

        I am using python 3.9.7, pyside 6.2.1.
        I ran the following command.

        pyside6-rcc --binary some.qrc -o some.rcc
        

        Then I got some.rcc but it was not a binary file. The contents of the file equalled to a file created by pyside6-rcc without --binarny option, likes some.py file.
        Maybe I did not input arguments to pyside6-rcc properly. How could I get binary .rcc file..?

        JonBJ Offline
        JonBJ Offline
        JonB
        wrote on last edited by JonB
        #3

        @EbyZero said in could pyside6-rcc compile .qrc to .rcc ?:

        pyside6-rcc --binary

        Could you supply a reference link for the command-line usage of pyside6-rcc? I am unable to locate such, so do not even know if it accepts a --binary option or what it says about it.

        EbyZeroE 1 Reply Last reply
        0
        • JonBJ JonB

          @EbyZero said in could pyside6-rcc compile .qrc to .rcc ?:

          pyside6-rcc --binary

          Could you supply a reference link for the command-line usage of pyside6-rcc? I am unable to locate such, so do not even know if it accepts a --binary option or what it says about it.

          EbyZeroE Offline
          EbyZeroE Offline
          EbyZero
          wrote on last edited by
          #4

          @JonB
          pyside6-rcc.exe is a script tool in 'python directory/Scripts' if you installed pyside6 by pip. If you installed pyside6, you can just use it on the terminal you used to use python.

          it's delicious!

          JonBJ 1 Reply Last reply
          0
          • EbyZeroE EbyZero

            @JonB
            pyside6-rcc.exe is a script tool in 'python directory/Scripts' if you installed pyside6 by pip. If you installed pyside6, you can just use it on the terminal you used to use python.

            JonBJ Offline
            JonBJ Offline
            JonB
            wrote on last edited by JonB
            #5

            @EbyZero
            I don't use Python, PySide-anything or Qt6! Hence I was looking an online documentation reference for pyside6-rcc, because I can't spot one Googling... indeed, there doesn't seem to be much out there about pyside6-rcc, only a bit about older pyside2-rcc, and under Linux, where it didn't seem to have any --binary option.

            EbyZeroE 1 Reply Last reply
            0
            • JonBJ JonB

              @EbyZero
              I don't use Python, PySide-anything or Qt6! Hence I was looking an online documentation reference for pyside6-rcc, because I can't spot one Googling... indeed, there doesn't seem to be much out there about pyside6-rcc, only a bit about older pyside2-rcc, and under Linux, where it didn't seem to have any --binary option.

              EbyZeroE Offline
              EbyZeroE Offline
              EbyZero
              wrote on last edited by EbyZero
              #6

              @JonB
              I could not find it on google too. so I opened this post.
              umm..let me short explain, if you installed pyside6 by pip, many qt6 stuffs installed in python directory including qt6 tools like designer, lupdate, lrelease, rcc, uic, linguist, etc.
              Because it's hard to find and execute tools in python directory when the tool be needed, pyside6 provides prefixed-named tools like 'pyside6-designer.exe' in python scripts directory can be used just on the terminal.
              Most of prefixed-named tools equals to original tools, so I thought 'pyside6-rcc.exe' also equals to 'rcc.exe', but it was not.
              Also I couldn't find accurate information on google, so I asked a question.
              I didn't get an answer yet, but I can get a binary .rcc file to use directly original rcc.exe in pyside6 directory.
              I'm not an english user, I'm not sure I explained it properly. Off topic, google translator is great.

              it's delicious!

              JonBJ 1 Reply Last reply
              0
              • EbyZeroE EbyZero

                @JonB
                I could not find it on google too. so I opened this post.
                umm..let me short explain, if you installed pyside6 by pip, many qt6 stuffs installed in python directory including qt6 tools like designer, lupdate, lrelease, rcc, uic, linguist, etc.
                Because it's hard to find and execute tools in python directory when the tool be needed, pyside6 provides prefixed-named tools like 'pyside6-designer.exe' in python scripts directory can be used just on the terminal.
                Most of prefixed-named tools equals to original tools, so I thought 'pyside6-rcc.exe' also equals to 'rcc.exe', but it was not.
                Also I couldn't find accurate information on google, so I asked a question.
                I didn't get an answer yet, but I can get a binary .rcc file to use directly original rcc.exe in pyside6 directory.
                I'm not an english user, I'm not sure I explained it properly. Off topic, google translator is great.

                JonBJ Offline
                JonBJ Offline
                JonB
                wrote on last edited by
                #7

                @EbyZero
                All I can say is: if you did not find documentation for pyside6-rcc.exe either, how do you know it accepts a --binary argument, and how do you know what that is supposed to do, if anything? Because that is your question!

                EbyZeroE 1 Reply Last reply
                0
                • JonBJ JonB

                  @EbyZero
                  All I can say is: if you did not find documentation for pyside6-rcc.exe either, how do you know it accepts a --binary argument, and how do you know what that is supposed to do, if anything? Because that is your question!

                  EbyZeroE Offline
                  EbyZeroE Offline
                  EbyZero
                  wrote on last edited by EbyZero
                  #8

                  @JonB
                  just..when I ran pyside6-rcc without any arguments, console output said '--binary Output a binary file for use as a dynamic resource' with many other options.

                  it's delicious!

                  1 Reply Last reply
                  0
                  • SGaistS Offline
                    SGaistS Offline
                    SGaist
                    Lifetime Qt Champion
                    wrote on last edited by
                    #9

                    Hi,

                    From the back of my memory, for Python the .qrc file will be converted in something useable in Python so you can import it and thus make it usable in your application. So you likely got a Python module that you can use with your code.

                    Interested in AI ? www.idiap.ch
                    Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                    1 Reply Last reply
                    0
                    • CristianMaureiraC Offline
                      CristianMaureiraC Offline
                      CristianMaureira
                      wrote on last edited by
                      #10

                      Here you have the tutorial on how to use qrc files. I have never seen a python project that works with a binary rcc file, the proper way is just to generate a python file that internally is serialized:
                      https://doc.qt.io/qtforpython/tutorials/basictutorial/qrcfiles.html

                      So only a pyside6-rcc yourfile.qrc -o rc_yourfile.py is enough to then do an import rc_yourfile.py and use the resources.

                      1 Reply Last reply
                      1

                      • Login

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