PDA

View Full Version : Q3UrlOperator



raphaelf
5th July 2006, 10:13
Hi everybody,

QT4.1.3
OS:WIN XP

I am trying to copy a file to another destination. I have a code that works perfect in qt3.2.1.
Now i am trying to compile this example in qt 4.1.3 but i get following error.


#include <Q3UrlOperator>
.
.
.
QStringList files = QFileDialog::getOpenFileNames(
this,
"Select one or more files to open",
"/home",
"Images (*.png *.xpm *.jpg)");
QStringList list = files;
QStringList::Iterator it = list.begin();
while( it != list.end() ) {
QFileInfo fi( *it);
QString base = fi.fileName();
Q3UrlOperator *op = new Q3UrlOperator();
QString src = *it;
QString target = "W:/Data/qt4/inventarMP/t2/release/zuu2/album1/" + base + "";
op->copy(src, target, false, false);
++it;}


error:


mainwindow.cpp:9:25: Q3UrlOperator: No such file or directory
mainwindow.cpp: In member function `void MainWindow::addSong()':
mainwindow.cpp:152: error: `Q3UrlOperator' undeclared (first use this function)
mainwindow.cpp:152: error: (Each undeclared identifier is reported only once for
each function it appears in.)
mainwindow.cpp:152: error: `op' undeclared (first use this function)
mainwindow.cpp:152: error: `Q3UrlOperator' has not been declared
mingw32-make[1]: *** [release\mainwindow.o] Error 1
mingw32-make[1]: Leaving directory `W:/Data/qt4/inventarMP/t2'
mingw32-make: *** [release] Error 2


What should i do to make my code running on qt 4.1.3 ? :o

jpn
5th July 2006, 10:19
To link against the Qt3Support module, add this line to your qmake .pro file:

QT += qt3support
Then re-run qmake to generate new makefile(s).

raphaelf
5th July 2006, 10:34
Hi JPN!!
Thanks it works :p