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-designer launcher is absent
Forum Updated to NodeBB v4.3 + New Features

pyside6-designer launcher is absent

Scheduled Pinned Locked Moved Solved Qt for Python
17 Posts 3 Posters 7.5k 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.
  • adrianghcA adrianghc

    I must admit I'm not familiar with the Arch packages, I only knew what they were supposed or not supposed to contain after I opened the file lists. The picture is much clearer now, though.
    pyside6-designer etc. are included if you install pyside6 via pip, in which case it would lie inside the bin directory of the Python environment you installed it in, see question 4 of my first response.
    There should be no difference between pyside6-designer and designer6 installed via qt6-tools so if installing PySide via pip is not an option you could just use the latter binary.

    S Offline
    S Offline
    StarterKit
    wrote on last edited by StarterKit
    #8

    @adrianghc said in pyside6-designer launcher is absent:

    There should be no difference between pyside6-designer and designer6 installed via qt6-tools

    Are you sure in this statement? I should that pyside6-designer should be some kind of script (that calls actual designer binary)... but I see that designer6 is a binary file.

    1 Reply Last reply
    0
    • adrianghcA Offline
      adrianghcA Offline
      adrianghc
      wrote on last edited by adrianghc
      #9

      There should be no difference between pyside6-designer and designer6 installed via qt6-tools
      There should be no difference between the designer binary called by pyside6-designer and designer6 installed via qt6-tools

      πŸ™‚

      S 1 Reply Last reply
      0
      • adrianghcA adrianghc

        There should be no difference between pyside6-designer and designer6 installed via qt6-tools
        There should be no difference between the designer binary called by pyside6-designer and designer6 installed via qt6-tools

        πŸ™‚

        S Offline
        S Offline
        StarterKit
        wrote on last edited by
        #10

        @adrianghc, okey... I still have some doubts but I should give it a try :) - will try to create simple widget next week

        1 Reply Last reply
        0
        • adrianghcA Offline
          adrianghcA Offline
          adrianghc
          wrote on last edited by adrianghc
          #11

          I just checked and while not the Arch package, the designer and assistant binaries are identical between the full Qt installation (from the Qt Online Installer) and PySide from pip on my system. πŸ‘

          Happy holidays, and good luck with the widgets next week. πŸ™‚

          S 1 Reply Last reply
          1
          • adrianghcA adrianghc

            I just checked and while not the Arch package, the designer and assistant binaries are identical between the full Qt installation (from the Qt Online Installer) and PySide from pip on my system. πŸ‘

            Happy holidays, and good luck with the widgets next week. πŸ™‚

            S Offline
            S Offline
            StarterKit
            wrote on last edited by StarterKit
            #12

            @adrianghc Merry Christmas to you! :)
            But my custom widget jorney isn't successful so far... What I did:

            1. Starting from this page I took Task Menu Extension (Designer) example.
            2. As there was no any register*.py file with registerCustomWidget() call I decided to create my own. As DOM_XML is already defined in tictactoeplugin.py my file is pretty simple:
            from tictactoeplugin import TicTacToePlugin, DOM_XML
            
            import QtDesigner
            
            QPyDesignerCustomWidgetCollection.registerCustomWidget(TicTacToePlugin, module="tictactoeplugin",
                                                                   tool_tip="Custom Widget", xml=DOM_XML)
            
            1. I set PYSIDE_DESIGNER_PLUGINS environment variable to point to the directory with example. And then ran designer6 from the same command line. The result is nothing, no new widgets are visible in Widget Box :(
            2. As "Troubleshooting the Qt Designer Plugin" section says I went to Help/About Plugins menu and there is an error indeed:
              Cannot load library /usr/lib/qt6/plugins/designer/libPySidePlugin.so: (/usr/lib/qt6/plugins/designer/libPySidePlugin.so: undefined symbol: PyImport_AddModule)
              The library itself is present in my filesystem:
            [user@pc designer]$ file /usr/lib/qt6/plugins/designer/libPySidePlugin.so
            /usr/lib/qt6/plugins/designer/libPySidePlugin.so: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, BuildID[sha1]=8cf43238963aab8d4f447e10d026898855e005f4, stripped
            

            From the name of file I see that error is related with PySide so I strongly suspect that I need to fix it before any further attempts... But I have no idea what I may do to fix it...
            My only suspect is - this part of manual was missed when Arch-package was compiled:
            When building Qt for Python, be sure to set the --standalone option for the plugin to be properly installed.
            as /usr/lib/qt6/plugins/designer/libPySidePlugin.so is owned by pyside6 6.4.1-2

            1 Reply Last reply
            0
            • S Offline
              S Offline
              StarterKit
              wrote on last edited by
              #13

              Meanwhile I tried the same on Windows.
              Plugin was loaded successfully and appeared in new Custom widgets tab of Widget Box.
              Menu Help/About Plugins shows that PySidePlugin.dll was loaded successully and TicTacToe appeared under it.

              So it appears to be a problem of Arch Linux setup...

              S 1 Reply Last reply
              0
              • S StarterKit

                Meanwhile I tried the same on Windows.
                Plugin was loaded successfully and appeared in new Custom widgets tab of Widget Box.
                Menu Help/About Plugins shows that PySidePlugin.dll was loaded successully and TicTacToe appeared under it.

                So it appears to be a problem of Arch Linux setup...

                S Offline
                S Offline
                StarterKit
                wrote on last edited by
                #14

                The story continues so I would like to keep this topic updated.
                The problem with libPySidePlugin.so import was indeed specific to pyside6 package of Arch Linux and fix was done in pyside6 6.5.1.1-2 release yesterday.

                Now there are no errors in Help/About Plugins menu but there is an error in console instead:

                [user@pc]$ PYSIDE_DESIGNER_PLUGINS=/home/projects/widget_plugins/ 
                [user@pc]$ export PYSIDE_DESIGNER_PLUGINS 
                [user@pc]$ designer6 
                PySide6/__init__.py: Unable to import Shiboken from /home/projects/widget_plugins, /usr/lib/python311.zip, /usr/lib/python3.11, /usr/lib/python3.11/lib-dynload, /usr/lib/python3.11/site-packages 
                qt.pysideplugin: Error running /home/projects/widget_plugins/register_designer_plugins.py: /usr/lib/python3.11/lib-dynload/binascii.cpython-311-x86_64-linux-gnu.so: undefined symbol: _PyUnicode_Ready 
                qt.pysideplugin: No instance of QPyDesignerCustomWidgetCollection was found.
                

                It prevents plugin from loading and seems to be a PySide bug...

                S 1 Reply Last reply
                0
                • S StarterKit

                  The story continues so I would like to keep this topic updated.
                  The problem with libPySidePlugin.so import was indeed specific to pyside6 package of Arch Linux and fix was done in pyside6 6.5.1.1-2 release yesterday.

                  Now there are no errors in Help/About Plugins menu but there is an error in console instead:

                  [user@pc]$ PYSIDE_DESIGNER_PLUGINS=/home/projects/widget_plugins/ 
                  [user@pc]$ export PYSIDE_DESIGNER_PLUGINS 
                  [user@pc]$ designer6 
                  PySide6/__init__.py: Unable to import Shiboken from /home/projects/widget_plugins, /usr/lib/python311.zip, /usr/lib/python3.11, /usr/lib/python3.11/lib-dynload, /usr/lib/python3.11/site-packages 
                  qt.pysideplugin: Error running /home/projects/widget_plugins/register_designer_plugins.py: /usr/lib/python3.11/lib-dynload/binascii.cpython-311-x86_64-linux-gnu.so: undefined symbol: _PyUnicode_Ready 
                  qt.pysideplugin: No instance of QPyDesignerCustomWidgetCollection was found.
                  

                  It prevents plugin from loading and seems to be a PySide bug...

                  S Offline
                  S Offline
                  StarterKit
                  wrote on last edited by StarterKit
                  #15

                  And finally it was found that pyside6-designer is included in PySide6-Essentials package that seems to be absent for Arch Linux but was installed on my Windows OS.

                  So this is a solution for Linux - you need to install PySide6-Essentials (for Arch Linux it was fixed in package pyside6 6.5.1.1-3)

                  But the wrapper itself is rather simple so it appears to be useful even without installation:

                  import re
                  import sys
                  from PySide6.scripts.pyside_tool import designer
                  if __name__ == '__main__':
                      sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
                      sys.exit(designer())
                  
                  CristianMaureiraC 1 Reply Last reply
                  1
                  • S StarterKit has marked this topic as solved on
                  • S StarterKit

                    And finally it was found that pyside6-designer is included in PySide6-Essentials package that seems to be absent for Arch Linux but was installed on my Windows OS.

                    So this is a solution for Linux - you need to install PySide6-Essentials (for Arch Linux it was fixed in package pyside6 6.5.1.1-3)

                    But the wrapper itself is rather simple so it appears to be useful even without installation:

                    import re
                    import sys
                    from PySide6.scripts.pyside_tool import designer
                    if __name__ == '__main__':
                        sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
                        sys.exit(designer())
                    
                    CristianMaureiraC Offline
                    CristianMaureiraC Offline
                    CristianMaureira
                    wrote on last edited by
                    #16

                    @StarterKit The main issue here was that the packages provided by different OS are adapted for their needs. We ship Qt for Python officially in wheels, so we expect that the use case is that you create a virtual environment, and pip install pyside6 there and develop your application. The PySide that come in Arch, and other distros don't have a similar structure nor the same goal for users, so I'd always recommend you not to install Python module system-wide and keep them in your virtual environments.

                    S 1 Reply Last reply
                    1
                    • CristianMaureiraC CristianMaureira

                      @StarterKit The main issue here was that the packages provided by different OS are adapted for their needs. We ship Qt for Python officially in wheels, so we expect that the use case is that you create a virtual environment, and pip install pyside6 there and develop your application. The PySide that come in Arch, and other distros don't have a similar structure nor the same goal for users, so I'd always recommend you not to install Python module system-wide and keep them in your virtual environments.

                      S Offline
                      S Offline
                      StarterKit
                      wrote on last edited by
                      #17

                      Hi @CristianMaureira, yes this is clear.
                      But it is much more convenient to have all your packages managed by a single packet manager. This is the reason why I prefer to use system-specific packages in case of Arch.
                      So as result Arch package was improved and I think it is an acceptable outcome.

                      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