Results 1 to 10 of 10

Thread: Can I use the Sql Module without chanage .pro file?

  1. #1
    Join Date
    Feb 2007
    Posts
    71
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11

    Question Can I use the Sql Module without chanage .pro file?



    Can I use the Sql Module without chanage .pro file?

    My Case:

    I use the MSVS 2005,QT 4.2.2

    I set the "Project Property"->"Configuration Properties"->"NMAKE":

    Build Command:
    qmake -project //because the file count or file name maybe chanag.
    qmake
    nmake /f Makefile.Debug

    but I want use the sql module........//this shoud add "QT += sql " to .pro file.

    so ........... Can I use the Sql Module without chanage .pro file?

  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: Can I use the Sql Module without chanage .pro file?

    Are you using a commercial version of Qt? Do you have the VS integration? If so, check the context menu of the solution/project in the solution explorer.
    J-P Nurmi

  3. #3
    Join Date
    May 2006
    Posts
    788
    Thanks
    49
    Thanked 48 Times in 46 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Can I use the Sql Module without chanage .pro file?

    if you run: qmake -project

    qmake build a new xxx.pro file and overwrite your actual pro file...
    to handle this make a separate os.pri file ...

    and write extra contenents like :

    Qt Code:
    1. UI_DIR = ui
    2. MOC_DIR = build/.moc
    3. RCC_DIR = build/.rcc
    4. OBJECTS_DIR = build/.obj
    5.  
    6.  
    7. QT += xml
    8. QT += network
    9. QT += sql
    10.  
    11.  
    12. win32 {
    13. DESTDIR += ./
    14. }
    15.  
    16. mac {
    17. DESTDIR += ~/Desktop
    18. }
    19.  
    20.  
    21. unix {
    22. DESTDIR += /usr/bin
    23. }
    To copy to clipboard, switch view to plain text mode 


    and on the new pro file insert only
    !include( os.pri ) : error( Unable to find os.pri )

    or you make many profile.. back-up

    debug.pro release.pro

    and tell qmake to use...

    qmake debug.pro

  4. #4
    Join Date
    Feb 2007
    Posts
    71
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11

    Default Re: Can I use the Sql Module without chanage .pro file?

    Quote Originally Posted by jpn View Post
    Are you using a commercial version of Qt? Do you have the VS integration? If so, check the context menu of the solution/project in the solution explorer.
    Can you say more? detailed it . I'm a Novice

  5. #5
    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: Can I use the Sql Module without chanage .pro file?

    Quote Originally Posted by fengtian.we View Post
    Can you say more? detailed it . I'm a Novice
    Could you answer the questions?
    J-P Nurmi

  6. #6
    Join Date
    Feb 2007
    Posts
    71
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11

    Default Re: Can I use the Sql Module without chanage .pro file?

    I use commercial version

  7. #7
    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: Can I use the Sql Module without chanage .pro file?

    Here's a screenshot of VS.

    • notice the Solution Explorer on the left
    • right click over solution title or project title (I don't remember which one was it)
    • select "Add Qt Module" or something similar from the opening context menu
    J-P Nurmi

  8. #8
    Join Date
    Feb 2007
    Posts
    71
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11

    Default Re: Can I use the Sql Module without chanage .pro file?

    jpn,thank you first

    I don't kown VS integration,I think is this problem,so I go find the VS integration now.

    to be continue...

  9. #9
    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: Can I use the Sql Module without chanage .pro file?

    Quote Originally Posted by fengtian.we View Post
    I don't kown VS integration,I think is this problem,so I go find the VS integration now.
    How do you open the project into VS, then? Do you create a VS project file with qmake at command line? If so, simply repeat the step after adding "QT += sql" to .pro file.
    J-P Nurmi

  10. #10
    Join Date
    Feb 2007
    Posts
    71
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11

    Default Re: Can I use the Sql Module without chanage .pro file?

    .....

    I'm use VS2005 c++ project(Makefile Project)

    OK now! I install the "VS integration",I use the "Qt Application Project" now. haha Thank you~~

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.