Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Why do apps built with PySide6 have a more cramped menu bar than native KDE apps?
Forum Updated to NodeBB v4.3 + New Features

Why do apps built with PySide6 have a more cramped menu bar than native KDE apps?

Scheduled Pinned Locked Moved Solved General and Desktop
14 Posts 3 Posters 2.1k 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.
  • SGaistS Offline
    SGaistS Offline
    SGaist
    Lifetime Qt Champion
    wrote last edited by
    #4

    Can you start your application with the QT_DEBUG_PLUGINS environment variable set to one and do the same with kcalc ?
    This should show which plugins are loaded and there might be some difference. Kcalc might also be using a KDE specific style.

    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
    • J Offline
      J Offline
      johnzhou721
      wrote last edited by
      #5

      @SGaist Thanks for the tip.

      Running my own app (with Python) I get results at https://pastebin.com/gAC4kryb -- note I just import from PySide6 without explicit code to use any plugins.

      Running kcalc I get https://pastebin.com/5VNhtAL2

      Any idea what's going on here? Thanks!

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

        Qt uses a set of plugins to do its work (visual interface, database, image, etc).
        It seems you have forgotten to set the variable for kcalc.

        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
        • J Offline
          J Offline
          johnzhou721
          wrote last edited by
          #7

          @SGaist No I have set it and somehow it does not give me any plugin info. Any other tips? I simply run kcalc from terminal...

          1 Reply Last reply
          0
          • J Offline
            J Offline
            johnzhou721
            wrote last edited by
            #8

            @SGaist I want to report some progress. Seems like it's not finding the Breeze style plugin. I'm using pyside6 by pip -- tried system package from fedora which unfortunately for fedora 42 (latest version kde spin) python3-pyside5 seems broken... it seesm that the pip version of pyside6 bundles Qt which doesn't have the plugin also the logs show that it's searching a place that is like /usr/lib or something but doesn't have the plugins. any ideas? thanks.

            1 Reply Last reply
            0
            • J Offline
              J Offline
              johnzhou721
              wrote last edited by
              #9

              Typo: python3-pyside6 in the last message instead of pyside5, I'm not sure if it's actually broken, even with a simple app (import and print the plugin search paths) I see error on Python initialization.

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

                PySide (whether 2 or 6) was always bundled Qt otherwise it means that the package would not be functional on systems without Qt installed beforehand.

                Which version of Qt do you have on your system ?

                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
                • J Offline
                  J Offline
                  johnzhou721
                  wrote last edited by
                  #11

                  @SGaist I've figured it out myself, sorry for distrubing you. Basically I need to install the PySide6 from system dnf instead of pip. It did not work because I didn't completely uninstall from Python -- I only uninstalled PySide6 not the -addons and -essentials stuff or shiboken. After uninstalling all these components and installing from dnf it works correctly. Thanks!

                  1 Reply Last reply
                  0
                  • J johnzhou721 has marked this topic as solved
                  • J Offline
                    J Offline
                    johnzhou721
                    wrote last edited by
                    #12

                    OK, I'm not sure why but after rebooting my VM after installing python3-PySide6 from dnf somehow it blackscreen so I had to update all packages by hooking into a serial device on UTM and then it'd work... why?

                    1 Reply Last reply
                    0
                    • D Offline
                      D Offline
                      dextermagnific
                      wrote last edited by
                      #13

                      I have read somewhere that Qt installed through pip is independent from the Qt installed through your system packages. Duplicate libs+plugins+styles etc ... so your program built against the pip installed Qt won't have access to the Qt installed by your distro vendor.

                      1 Reply Last reply
                      0
                      • J Offline
                        J Offline
                        johnzhou721
                        wrote last edited by
                        #14

                        @dextermagnific Yes, I have realized that, but installing python3-pyside6 through dnf in fedora kde spin seem to cause it to not boot, and I'd have to update all packages from a hooked up tty for it to boot.

                        I'm going to make a reproducer with this issue when I'm less busy and probably talk on the fedora forums to see what they've got to say about this.

                        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