Fix errors in README#87
Conversation
aleksamagicka
commented
Mar 13, 2018
- Fix the broken link in header
- Fix the example C++ code (putting ':' tells Qt to look in the root of the resource directory)
| [](https://opensource.org/licenses/MIT) | ||
| [](https://creativecommons.org/licenses/by/4.0/) | ||
| [][http://contributor-covenant.org/version/1/4/] | ||
| [](http://contributor-covenant.org/version/1/4/) |
|
|
||
| ```cpp | ||
| QFile f("qdarkstyle/style.qss"); | ||
| QFile f(":qdarkstyle/style.qss"); |
There was a problem hiding this comment.
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 :)
There was a problem hiding this comment.
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 😊
There was a problem hiding this comment.
@aleksasteam thanks again! @ColinDuquesnoy thanks for the information.
There was a problem hiding this comment.
|
@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 |

