SHARE
TWEET

Untitled

a guest Jun 20th, 2019 55 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. QString get_note_description_html(int note_num){
  2.     QString data;
  3.     QString html_filename;
  4.     switch (note_num){
  5.     {
  6.         case 1:
  7.             html_filename = "1.html";
  8.             break;
  9.         case 2:
  10.             html_filename = "2.html";
  11.             break;
  12.         default:
  13.             html_filename ="1.html";
  14.     }
  15.     QFile file(":/html/1.htm"); // тут вписывай путь к html с описанием
  16.     if(!file.open(QIODevice::ReadOnly)) {
  17.         qDebug()<<"filenot opened"<<endl;
  18.     }
  19.     else
  20.     {
  21.         qDebug()<<"file opened"<<endl;
  22.         data = QString::fromLocal8Bit(file.readAll());
  23.     }
  24.     return data;
  25. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top