Results 1 to 3 of 3

Thread: Q3UrlOperator

  1. #1
    Join Date
    Jan 2006
    Posts
    273
    Thanks
    42
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4
    Platforms
    Windows

    Default Q3UrlOperator

    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.
    Qt Code:
    1. #include <Q3UrlOperator>
    2. .
    3. .
    4. .
    5. QStringList files = QFileDialog::getOpenFileNames(
    6. this,
    7. "Select one or more files to open",
    8. "/home",
    9. "Images (*.png *.xpm *.jpg)");
    10. QStringList list = files;
    11. QStringList::Iterator it = list.begin();
    12. while( it != list.end() ) {
    13. QFileInfo fi( *it);
    14. QString base = fi.fileName();
    15. Q3UrlOperator *op = new Q3UrlOperator();
    16. QString src = *it;
    17. QString target = "W:/Data/qt4/inventarMP/t2/release/zuu2/album1/" + base + "";
    18. op->copy(src, target, false, false);
    19. ++it;}
    To copy to clipboard, switch view to plain text mode 

    error:
    Qt Code:
    1. mainwindow.cpp:9:25: Q3UrlOperator: No such file or directory
    2. mainwindow.cpp: In member function `void MainWindow::addSong()':
    3. mainwindow.cpp:152: error: `Q3UrlOperator' undeclared (first use this function)
    4. mainwindow.cpp:152: error: (Each undeclared identifier is reported only once for
    5. each function it appears in.)
    6. mainwindow.cpp:152: error: `op' undeclared (first use this function)
    7. mainwindow.cpp:152: error: `Q3UrlOperator' has not been declared
    8. mingw32-make[1]: *** [release\mainwindow.o] Error 1
    9. mingw32-make[1]: Leaving directory `W:/Data/qt4/inventarMP/t2'
    10. mingw32-make: *** [release] Error 2
    To copy to clipboard, switch view to plain text mode 

    What should i do to make my code running on qt 4.1.3 ?
    Think DigitalGasoline

  2. #2
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: Q3UrlOperator

    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).
    J-P Nurmi

  3. #3
    Join Date
    Jan 2006
    Posts
    273
    Thanks
    42
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4
    Platforms
    Windows

    Default Re: Q3UrlOperator

    Hi JPN!!
    Thanks it works
    Think DigitalGasoline

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.