Results 1 to 3 of 3

Thread: Porting problem from Qt3 to Qt4

  1. #1
    Join Date
    Mar 2006
    Posts
    20
    Qt products
    Qt3
    Platforms
    Unix/X11

    Default Porting problem from Qt3 to Qt4

    Hi,
    I'm using below function for playing .wav file......
    This program is working with Qt3 (fedora c2)but its not working with Qt4 (fedora c2)

    StartAlarm()
    {
    Q3Process *AlarmProcess;
    AlarmProcess = new Q3Process (this);
    AlarmProcess->setArguments("playwave"); // the player
    if(rcCheckSound->isChecked() == 1)
    AlarmProcess->addArgument(leFile->text() );
    else
    AlarmProcess->addArgument("1.wav");
    AlarmProcess->start();
    }

    Its giving this ERROR with Qt4::

    error: no matching function for call to `Q3Process::
    setArguments(const char[10])'
    /usr/local/Trolltech/Qt-4.1.2/include/Qt3Support/q3process.h:50: error: candidates
    are: virtual void Q3Process::setArguments(const QStringList&)

    Plz help me i didnt do much work with qt.....

    Thanks
    Krishna

  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: Porting problem from Qt3 to Qt4

    Try:
    Qt Code:
    1. #include <QStringList>
    2. AlarmProcess->setArguments(QStringList() << "playwave"); // the player
    To copy to clipboard, switch view to plain text mode 
    J-P Nurmi

  3. #3
    Join Date
    Jan 2006
    Location
    Napoli, Italy
    Posts
    621
    Thanks
    5
    Thanked 86 Times in 81 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Porting problem from Qt3 to Qt4

    Quote Originally Posted by Krishnacins
    Hi,

    This program is working with Qt3 (fedora c2)but its not working with Qt4 (fedora c2)

    StartAlarm()
    {
    Q3Process *AlarmProcess;
    AlarmProcess = new Q3Process (this);
    AlarmProcess->setArguments("playwave"); // the player
    if(rcCheckSound->isChecked() == 1)
    AlarmProcess->addArgument(leFile->text() );
    else
    AlarmProcess->addArgument("1.wav");
    AlarmProcess->start();
    }

    Plz help me i didnt do much work with qt.....

    Thanks
    Krishna
    ????????????????????

    Q3Process, like QProcess in Qt3.x don't have a member

    Qt Code:
    1. setArguments(const QString&)
    To copy to clipboard, switch view to plain text mode 

    but have

    Qt Code:
    1. setArguments(const QStringList&)
    2. addArgument(const QString&)
    To copy to clipboard, switch view to plain text mode 



    This code really compile and work with QT3?????
    A camel can go 14 days without drink,
    I can't!!!

Similar Threads

  1. Ui problem of QT3 porting to QT4
    By batileon in forum Newbie
    Replies: 1
    Last Post: 12th June 2008, 10:31
  2. Weird problem while porting from Qt3 to Qt4
    By vermarajeev in forum Qt Programming
    Replies: 4
    Last Post: 8th August 2007, 07:51
  3. Problem related to porting from QT3 to QT4 in list items
    By rohitjun in forum Qt Programming
    Replies: 5
    Last Post: 1st June 2007, 09:05
  4. Problem porting Kivio MP on win32 from Qt 3 to Qt 4
    By Amanda in forum Qt Programming
    Replies: 2
    Last Post: 26th October 2006, 19:40
  5. Problem in porting Main window on linux
    By jyoti kumar in forum Qt Tools
    Replies: 2
    Last Post: 2nd June 2006, 08:35

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.