Giter Club home page Giter Club logo

qute's People

Contributors

mikemalinowski avatar tobyh-b avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

qute's Issues

Preference: Unsure why using a different namespace?

from .utilities.styling import apply as applyStyle

Unsure why the package imports using a different namesapce?
If related to backwards compatibility, it might be clearer/cleaner to use aliases later on?
I can imagine a wide usage of both names depending on where its being imported from, which might cause unnecessary confusion.

Suggestion: Consider supporting iterables for clipboard value.

utilities.qApp().clipboard().setText(self._value)

If desired, it might be useful to support iterables in value.
Paths could be joined with os.pathsep
https://docs.python.org/3/library/os.html#os.pathsep

Text could be joined with newlines.

dicts could be encoded with json or cast as str() (its a stretch but sometimes useful).

I've found this pattern useful in such a generic function, although it does make some assumptions.

Preference: Explicit is better than implicit.

_py_version = 3

Currently implicitly decides that its using python 2 or 3 based on available imports.
As unlikely as it is, you may have matching available module names or identically named backports that could cause issues with the assumption that you're running on Python 2/3.

It might be "safer" to explicitly check the version of python and import from that?

Minor: logging.getLogger may need to ensure there is a rootLogger beforehand.

log = logging.getLogger('qute')

It might be safer to ensure there is a root logger available. If there isnt byt this point , I dont think the log object will output.

Might be worth double checking if you need to call logging.basicConfig(level=logging.INFO) beforehand, perhaps ideally with your preferred log level. Its not used if a root logger already exists, so there shouldnt be a downside.

Suggestion: Would it be worth using `six` instead of direct support for string types?

def is_string(value):

The six module can be useful for instances like this.
For example, in this method, you're always unnecessarily paying the cost of testing against basestring if you're in Python 3.

Other option is to define the missing type once;

try:
    basestring
except NameError:
    basestring = str

and then using basestring.
This being said, it may also cause confusion :/

Minor: Global stylesheet on HorizontalDivider may unintentionally override inherited stylesheet behaviour.

self.setStyleSheet("background-color: rgb(20,20,20)")

AFAIK, setting a global (right terminology?) stylesheet on a QObject may unintentially reduce flexibility from inherited styles.
par = QWidget() par.setStyleSheet('QFrame:hover{border: 2px solid green;}') div = HorizontalDivider(parent=par)

That being siad, its quite possible this is the intended behaviour (if so, feel free to close).

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.