Results 1 to 8 of 8

Thread: Porting Qt3 linux app to windows qt4

Threaded View

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

    Default Re: Porting Qt3 linux app to windows qt4

    Steps I did to get it compile on WinXP + Qt 4.1.2:
    - converted form.ui to qt4
    - sql1.pro, added line "QT += qt3support sql"
    - main.cpp, fixed include:
    Qt Code:
    1. #include "ui_form.h" // note "ui_" prefix
    To copy to clipboard, switch view to plain text mode 
    - main.cpp, fixed ui loading (direct approach):
    Qt Code:
    1. Q3MainWindow w;
    2. Ui_Form ui;
    3. ui.setupUi(&w);
    4. w.show();
    To copy to clipboard, switch view to plain text mode 
    - conexion.cpp, fixed includes:
    Qt Code:
    1. #include <q3datatable.h> // qt3support
    2. #include <q3sqlcursor.h> // qt3support
    3. #include "ui_form.h" // note "ui_" prefix
    4. #include <qsqlerror.h> // added
    To copy to clipboard, switch view to plain text mode 
    - conexion.cpp, fixed defaultDB variable:
    either:
    Qt Code:
    1. QSqlDatabase defaultDB; // remove '*'
    2. // and replace occurrences of "defaultDB->" to "defaultDB."
    To copy to clipboard, switch view to plain text mode 

    Edit: Not that it'd be fully working, but at least it compiles.
    Last edited by jpn; 11th May 2006 at 21:34. Reason: A side note
    J-P Nurmi

Similar Threads

  1. Porting Qt application from linux to Windows
    By ankit17.ag in forum Qt Programming
    Replies: 5
    Last Post: 12th February 2009, 21:18
  2. Replies: 5
    Last Post: 15th January 2009, 09:03
  3. linux to windows porting issues
    By qtprogrammer12345 in forum Qt Programming
    Replies: 1
    Last Post: 23rd May 2008, 06:45
  4. Font Problem Porting from Windows to Linux
    By rajeshs in forum Qt Programming
    Replies: 1
    Last Post: 13th July 2007, 10:25
  5. problem of porting from windows to linux
    By jyoti kumar in forum Qt Programming
    Replies: 4
    Last Post: 22nd May 2006, 08:42

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.