Hi all!
I must prepare an application for Windows for copying files, it's some kind of "Advanced Paste".
It should read a list of filepaths from the system clipboard (this filepaths are already in the clipboard using the windows buit-in Edit->Copy function from the file manager) and make a copy of those files using a series of rules that the user can specify.
On linux it works perfectly, while in windows I have some problem. In linux when you issue the "Copy" command, you will find a simple list of paths in the clipboard. In windows I can't figure out what format is used, so I cannot identify the selected files.
This is the section of code which takes the filepaths from the clipboard:
...
qDebug()<<"The system clipboard contains:\n" <<clipboard->text();
QString clipboard_text
=clipboard
->text
();
...
...
QClipboard *clipboard=qApp->clipboard();
qDebug()<<"The system clipboard contains:\n" <<clipboard->text();
QString clipboard_text=clipboard->text();
QStringList file_list=clipboard_text.split('\n',QString::SkipEmptyParts);
...
To copy to clipboard, switch view to plain text mode
Under linux it works and gives me the content of the clipboard, on windows it says the clipboard is empty.
Anyone can help?
Bookmarks