Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix errors in README #87

Merged
merged 2 commits into from
Mar 26, 2018
Merged

Fix errors in README #87

merged 2 commits into from
Mar 26, 2018

Conversation

aleksamagicka
Copy link
Contributor

  • Fix the broken link in header
  • Fix the example C++ code (putting ':' tells Qt to look in the root of the resource directory)

@@ -4,7 +4,7 @@
[![Latest PyPI version](https://img.shields.io/pypi/v/QDarkStyle.svg)](https://pypi.python.org/pypi/QDarkStyle)
[![License: MIT](https://img.shields.io/dub/l/vibe-d.svg)](https://opensource.org/licenses/MIT)
[![License: CC BY 4.0](https://img.shields.io/badge/License-CC%20BY%204.0-lightgrey.svg)](https://creativecommons.org/licenses/by/4.0/)
[![conduct](https://img.shields.io/badge/code%20of%20conduct-contributor%20covenant-green.svg?style=flat-square)][http://contributor-covenant.org/version/1/4/]
[![conduct](https://img.shields.io/badge/code%20of%20conduct-contributor%20covenant-green.svg?style=flat-square)](http://contributor-covenant.org/version/1/4/)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@@ -47,7 +47,7 @@ From code: Download/clone the project, go to ``qdarkstyle`` folder then:
- Load the stylesheet:

```cpp
QFile f("qdarkstyle/style.qss");
QFile f(":qdarkstyle/style.qss");
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not so familiar with Qt in C++, but some user has sent me an email saying that it did not work with ":". I've read something about it and they didn't use ":". There is a link for examples of QFile. At this moment I don't have an environment to test. Can you bring more info about it?

I commonly don't use ":" when referring to a real file, i.e resource file. I used ":" just when referring a prefix inside a resource file.

resource_path = "../../icons/resource.qrc"
icon_path = ":/resource_prefix/sub_prefix/image_name.ext"

Thanks for your contribution :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IIRC I added it as a resource, and for it to work I had to add ':'. See here. It's for accessing resources, if you are accessing a real file, as you said, you don't need it.

I thought that the second step in the README meant adding the file as a resource, and I needed to add the ':' for it to work that way. Thought it was missing, so I sent a PR 😊

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@aleksasteam You're right. The second step in the README meant adding the file as a resource. The missing : is a typo and is really needed.

@dpizetta FYI the : is not specific to C++, we use it to load the stylesheet with python as well.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@aleksasteam thanks again! @ColinDuquesnoy thanks for the information.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dpizetta dpizetta merged commit 4a0b4df into ColinDuquesnoy:master Mar 26, 2018
@lincolningaroca
Copy link

Hi guys, I had a problem applying the css, it happens with the QComboBox, when deploying the combo, it looks very bad, the combo size is distorted, as invisible items would have been added.

but this happens only when the fusion style is applied, otherwise it looks normal.

here is a screenshot.

image

image

@dpizetta
Copy link
Collaborator

@lincolningaroca Could you open a new issue for that and add info about your system asked in the issue report? Also, it is very important that you remove names and e-mails from other people from the image you post here (if it is not a bummy DB). Tks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants