Results 1 to 6 of 6

Thread: Problem related to porting from QT3 to QT4 in list items

  1. #1
    Join Date
    Mar 2007
    Posts
    21
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Windows

    Default Problem related to porting from QT3 to QT4 in list items

    Hi All

    I am porting my code from QT3 to QT4. I used QPtrList which allowed me to append items in my list as "void QPtrList::append ( const type * item )". Now what can i do to acheive the same result in QT4. Please help

    Thanks alot

    Rohit

  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: Problem related to porting from QT3 to QT4 in list items

    J-P Nurmi

  3. #3
    Join Date
    Mar 2007
    Posts
    21
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Problem related to porting from QT3 to QT4 in list items

    Hi JPN

    Problem is solved. Thanks alot.

    But there are alot alot of modifications required to convert the code from QT3 to QT4.
    Is there any simple way to do that. I am thinking of writing all the code again, because modificationa are alot. Please suggest.

    Rohit

  4. #4
    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: Problem related to porting from QT3 to QT4 in list items

    There is qt3to4 - The Qt 3 to 4 Porting Tool which is designed to automate the most tedious part of the porting effort.
    J-P Nurmi

  5. #5
    Join Date
    Mar 2007
    Posts
    21
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Problem related to porting from QT3 to QT4 in list items

    Hi JPN

    I used the tool, it converted also. See the changed example code below

    #include <qlayout.h>
    #include <Q3WidgetStack>
    //Added by qt3to4:
    #include <Q3HBoxLayout>

    but i am getting error that Q3WidgetStack and Q3HBoxLayout files not present.


    Rohit

  6. #6
    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: Problem related to porting from QT3 to QT4 in list items

    To link against the Qt3Support module, add this line to your qmake .pro file:
    QT += qt3support
    (adds proper include paths too).
    J-P Nurmi

Similar Threads

  1. QGraphicsItem problem - how to save items info ??
    By aamer4yu in forum Qt Programming
    Replies: 3
    Last Post: 17th October 2006, 12:17

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.