equal
deleted
inserted
replaced
270 // load external stylesheet if there is any |
270 // load external stylesheet if there is any |
271 QFile extFile(dataMgr.findFileForRead("css/" + fname)); |
271 QFile extFile(dataMgr.findFileForRead("css/" + fname)); |
272 |
272 |
273 QFile resFile(":/res/css/" + fname); |
273 QFile resFile(":/res/css/" + fname); |
274 |
274 |
275 QFile & file = (extFile.exists()?extFile:resFile); |
275 QFile & file = (extFile.exists() ? extFile : resFile); |
276 |
276 |
277 if (file.open(QIODevice::ReadOnly | QIODevice::Text)) |
277 if (file.open(QIODevice::ReadOnly | QIODevice::Text)) |
278 { |
278 style.append(file.readAll()); |
279 QTextStream in(&file); |
|
280 while (!in.atEnd()) |
|
281 { |
|
282 QString line = in.readLine(); |
|
283 if(!line.isEmpty()) |
|
284 style.append(line); |
|
285 } |
|
286 } |
|
287 |
279 |
288 app.form = new HWForm(NULL, style); |
280 app.form = new HWForm(NULL, style); |
289 app.form->show(); |
281 app.form->show(); |
290 return app.exec(); |
282 return app.exec(); |
291 } |
283 } |