Giter Club home page Giter Club logo

Comments (3)

dpizetta avatar dpizetta commented on June 3, 2024 2

Actually, this is a problem with the QtPy already mentioned some time ago in this.

Since I'm building the assets in the Qt6, QtPy will try in this order PyQt5/PySide2/PyQt6/Pyside6. So, if it start with PySide6, QtPy won't test the other possibilities.

For now I'll rebuild the assets in Qt5, them with some time I can help with the PR for the QtPy.

from qdarkstylesheet.

dpizetta avatar dpizetta commented on June 3, 2024 1

Hey guys, thank you for reporting, I'll take a look this weekend. I think I generated the assets with pyside6, so maybe thats the problem. Thanks!

from qdarkstylesheet.

ccordoba12 avatar ccordoba12 commented on June 3, 2024

Hey @skp17, thanks for reporting. We've also noticed a similar problem in Spyder.

@dpizetta, a simple way to reproduce this is by running the following commands in a virtualenv:

pip install pyqt==5.12 ipython
ipython

and then

In [1]: from qdarkstyle import load_stylesheet

In [2]: css = load_stylesheet()
---------------------------------------------------------------------------
FileNotFoundError                         Traceback (most recent call last)
Cell In[2], line 1
----> 1 css = load_stylesheet()

File ~/.virtualenvs/test-qdark/lib/python3.8/site-packages/qdarkstyle/__init__.py:341, in load_stylesheet(*args, **kwargs)
    339 # No arguments
    340 if not kwargs and not args:
--> 341     stylesheet = _load_stylesheet(qt_api='pyqt5')
    343 # Old API arguments
    344 elif 'pyside' in kwargs or isinstance(arg, bool):

File ~/.virtualenvs/test-qdark/lib/python3.8/site-packages/qdarkstyle/__init__.py:273, in _load_stylesheet(qt_api, palette)
    271     stylesheet = ""
    272     # Todo: check this raise type and add to docs
--> 273     raise FileNotFoundError("Unable to find QSS file '{}' "
    274                             "in resources.".format(qss_rc_path))
    276 _logger.debug("Checking patches for being applied.")
    278 # Todo: check execution order for these functions
    279 # 1. Apply OS specific patches

FileNotFoundError: Unable to find QSS file ':qdarkstyle/dark/darkstyle.qss' in resources.

This error doesn't happen in PyQt 5.15, but it does in version 5.12 and, according to the info reported by @skp17, in 5.11 as well.

So, I think the assets need to be regenerated so that they work in older PyQt versions.

Could you take a look at that? Thanks!

from qdarkstylesheet.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.