i'm showing a dir content by:
Code:
tree->setModel(model); layout->addWidget(tree,0,0,1,1);
And the question is - how to "run" a file whith is clicked in application depend of the filetype (example like in windows)
Printable View
i'm showing a dir content by:
Code:
tree->setModel(model); layout->addWidget(tree,0,0,1,1);
And the question is - how to "run" a file whith is clicked in application depend of the filetype (example like in windows)
bool QDesktopServices::openUrl ( const QUrl & url ) [static]
If the URL is a reference to a local file (i.e., the URL scheme is "file") then it will be opened with a suitable application instead of a Web browser.