From bba2d80b98fae3198d4f109c7c040cc76e8fffb7 Mon Sep 17 00:00:00 2001 From: ColinDuquesnoy Date: Mon, 17 Feb 2014 15:58:00 +0100 Subject: [PATCH] Update readme Now that style.qss has been added to the qrc file, users do not need to add it themselves. --- README.md | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index d8dd9162e..3a6895370 100644 --- a/README.md +++ b/README.md @@ -44,12 +44,10 @@ C++ 2) Add **qdarkstyle/style.qrc** to your **.pro file** -3) Add **qdarkstyle/style.qss** to your resources. - -4) Load the stylesheet: +3) Load the stylesheet: ```cpp -QFile data(":path/to/style.qss"); // TODO: set your own resource path +QFile f(":qdarkstyle/style.qss"); if (!f.exists()) { printf("Unable to set stylesheet, file not found\n"); @@ -57,7 +55,7 @@ if (!f.exists()) else { f.open(QFile::ReadOnly | QFile::Text); - QTextStream ts(&data); + QTextStream ts(&f); QApplication::instance()->setStyleSheet(ts.readAll()); }