0

Is it possible to add styles for PySide2, Currently i just have "fusion", "windows", "windowsvista". I wanted to fetch more styles.

I followed steps from 63477276 and 39201227.

After looking into those questions, there are actually more than just 3 predefined styles in qt but we need to manually fetch them, i was trying to fetch those

cd src\ && ( if not exist Makefile C:\mingw\bin\qmake.exe Tests\qtstyleplugins\src\src.pro -o Makefile ) && C:/ProgramData/chocolatey/lib/make/tools/install/bin/make.exe -f Makefile
make[1]: Entering directory 'Tests/qtstyleplugins/src'
cd plugins\ && ( if not exist Makefile C:\mingw\bin\qmake.exe Tests\qtstyleplugins\src\plugins\plugins.pro -o Makefile ) && C:/ProgramData/chocolatey/lib/make/tools/install/bin/make.exe -f Makefile
make[2]: Entering directory 'Tests/qtstyleplugins/src/plugins'
cd platformthemes\ && ( if not exist Makefile C:\mingw\bin\qmake.exe Tests\qtstyleplugins\src\plugins\platformthemes\platformthemes.pro -o Makefile ) && C:/ProgramData/chocolatey/lib/make/tools/install/bin/make.exe -f Makefile
make[3]: Entering directory 'Tests/qtstyleplugins/src/plugins/platformthemes'
make[3]: Nothing to be done for 'first'.
make[3]: Leaving directory 'Tests/qtstyleplugins/src/plugins/platformthemes'
cd styles\ && ( if not exist Makefile C:\mingw\bin\qmake.exe Tests\qtstyleplugins\src\plugins\styles\styles.pro -o Makefile ) && C:/ProgramData/chocolatey/lib/make/tools/install/bin/make.exe -f Makefile
make[3]: Entering directory 'Tests/qtstyleplugins/src/plugins/styles'
cd cleanlooks\ && ( if not exist Makefile C:\mingw\bin\qmake.exe Tests\qtstyleplugins\src\plugins\styles\cleanlooks\cleanlooks.pro -o Makefile ) && C:/ProgramData/chocolatey/lib/make/tools/install/bin/make.exe -f Makefile
Project ERROR: No module claims plugin type 'styles'
make[3]: *** [Makefile:41: sub-cleanlooks-make_first] Error 3
make[3]: Leaving directory 'Tests/qtstyleplugins/src/plugins/styles'
make[2]: *** [Makefile:65: sub-styles-make_first] Error 2
make[2]: Leaving directory 'Tests/qtstyleplugins/src/plugins'
make[1]: *** [Makefile:39: sub-plugins-make_first] Error 2
make[1]: Leaving directory 'Tests/qtstyleplugins/src'
make: *** [Makefile:39: sub-src-make_first] Error 2

With that step, i was not able to convert .cpp to .dll files (for windows)

version: 5.15.2
os: windows

before that step, i cloned repo from code.qt

Is there any other way to add styles for pyside2.

Rahul A Ranger
  • 496
  • 1
  • 5
  • 13
  • Styles are usually "installed", so the real question is: what are you trying to achieve? If you only want to override some behavior, a better and simpler solution is to use a [QProxyStyle](https://doc.qt.io/qt-5/qproxystyle.html). – musicamante Jan 13 '22 at 20:13
  • There are actually more predefined style i was trying to fetch them. Sorry question was incomplete before – Rahul A Ranger Jan 13 '22 at 20:31
  • Not all styles are available for all systems, and that's because they might depend on the underlying OS. For instance, the style used on Apple computers cannot be used on other systems than macOS. It might be useful to know what styles you really want to have, why do you want them, and on what target system are you willing to get them. – musicamante Jan 13 '22 at 20:36
  • I believe this all [Styles](https://code.qt.io/cgit/qt/qtstyleplugins.git/tree/src/plugins/styles) are common. But we didn't have those after pip install `PySide2`. – Rahul A Ranger Jan 14 '22 at 05:04

0 Answers0