yellowmat
24th February 2006, 09:00
Hi,
I'm looking for a function to copy a file from a directory to another ... but this function is not located in that class.
Where could I find this function ?
Then I search a little bit and I discover a class nammed QUrlOperator, is that class could do what I want on a windows file system ? If yes how does it works ?
I code the two following slots
void testDialog::init()
{
QString message;
QUrlOperator op("c:\\user\\AFile.txt");
QUrlInfo fi = op.info("c:\\user\\AFile.txt");
message = "Filename = " + fi.name();
write(message);
}
void testDialog::write( const QString &line )
{
lb->insertItem(line);
lb->setBottomItem(lb->count()-1);
}
... but it does not write the file name, what's wrong with my code ?
Thanks in advance.
I'm looking for a function to copy a file from a directory to another ... but this function is not located in that class.
Where could I find this function ?
Then I search a little bit and I discover a class nammed QUrlOperator, is that class could do what I want on a windows file system ? If yes how does it works ?
I code the two following slots
void testDialog::init()
{
QString message;
QUrlOperator op("c:\\user\\AFile.txt");
QUrlInfo fi = op.info("c:\\user\\AFile.txt");
message = "Filename = " + fi.name();
write(message);
}
void testDialog::write( const QString &line )
{
lb->insertItem(line);
lb->setBottomItem(lb->count()-1);
}
... but it does not write the file name, what's wrong with my code ?
Thanks in advance.