Hello,
I need to work with web generated xml document. If I work with local disk file, everithing's fine:
...
cout << "chyba!";
return;
}else{
cout << "soubor otevren...";
read(&file);
}
file.close();
...
...
QFile file(url);
if(!file.open(QFile::ReadOnly | QFile::Text)) {
cout << "chyba!";
return;
}else{
cout << "soubor otevren...";
read(&file);
}
file.close();
...
To copy to clipboard, switch view to plain text mode
You see, I send to method read pointer to file (QIODevice). I want to do something like this:
...
if(!address.
open(QFile::ReadOnly |
QFile::Text)) { cout << "chyba!";
return;
}else{
cout << "soubor otevren...";
read(&address);
}
...
...
QUrl address = QUrl(url);
if(!address.open(QFile::ReadOnly | QFile::Text)) {
cout << "chyba!";
return;
}else{
cout << "soubor otevren...";
read(&address);
}
...
To copy to clipboard, switch view to plain text mode
Of course I know, it's wrong. I found only QDesktopServices:
penUrl ( const QUrl & url ) but it opens URL in web browser and I don't want this! I need to work with generated xml file.
It crossed my mind that I can save generated document to disk and then can I work with that like I want to. But I think it's soo complicated.
Thx for any answer...
Bookmarks