Results 1 to 5 of 5

Thread: Qt Creator always weird

  1. #1
    Join Date
    May 2008
    Posts
    276
    Thanks
    13
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Qt Creator always weird

    I know that QT Creator is a working progress project and I prefer it to Eclipse.
    But sometimes the setting of the Project working env. is frustrating
    I have a project and if I run it from inside Qt Creator I get " QSQl driver not loaded".
    If I run it from a command prompt no problem.
    Follow the .pro
    Qt Code:
    1. TEMPLATE = app
    2. TARGET =
    3. DEPENDPATH += . \
    4. debug \
    5. release
    6. INCLUDEPATH += .
    7.  
    8. # Input
    9. HEADERS += chooselang.h \
    10. data.h \
    11. daticliente.h \
    12. mainwindow.h \
    13. myfilter.h
    14. FORMS += chooselang.ui \
    15. daticliente.ui \
    16. mainwindow.ui
    17. SOURCES += chooselang.cpp \
    18. daticliente.cpp \
    19. main.cpp \
    20. mainwindow.cpp \
    21. myfilter.cpp
    22. RESOURCES += omnivision.qrc
    23. QT += sql \
    24. network \
    25. svg
    To copy to clipboard, switch view to plain text mode 

    And this is the output of Qt Creator:
    Qt Code:
    1. Starting C:\Users\giuseppe\Documents\Programmi\OmniVision\release\omnivision.exe...
    2. Lib Path ("C:/Qt/2010.05/qt/plugins", "C:/Users/giuseppe/Documents/Programmi/OmniVision/release")
    3. database clienti= "C:/Users/giuseppe/Documents/Programmi/OmniVision/release/clie.db"
    4. QSqlDatabase: QSQLITE driver not loaded
    5. QSqlDatabase: available drivers:
    6. Problems with database clients= QSqlError(-1, "Driver not loaded", "Driver not loaded")
    7. C:\Users\giuseppe\Documents\Programmi\OmniVision\release\omnivision.exe exited with code 0
    To copy to clipboard, switch view to plain text mode 

    I put the entire sqldrivers folder inside release directory.
    Any help appreciated

  2. #2
    Join Date
    Nov 2010
    Posts
    315
    Thanked 53 Times in 51 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: Qt Creator always weird

    do you have active shadow build?

  3. #3
    Join Date
    May 2008
    Posts
    276
    Thanks
    13
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Qt Creator always weird

    What is? What do you mean with active shadow build?
    However, avent after adding this line of code
    Qt Code:
    1. QCoreApplication::addLibraryPath(QCoreApplication::applicationDirPath()+"/sqldrivers");
    To copy to clipboard, switch view to plain text mode 
    I got the same result
    Last edited by giusepped; 25th July 2011 at 09:51.

  4. #4
    Join Date
    Nov 2010
    Posts
    315
    Thanked 53 Times in 51 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: Qt Creator always weird

    this will not solve problems caused by shadow build.
    Qt Creator is designed to handle multiple platforms and multiple Qt versions. By default to prevent interaction between each target Qt Creator cretes seperate directory for each type of build.
    Usually this directory is: "../<your project name with qt version appended>" (reletive to project directory).
    Solutions:
    disable shadow build (in project properties)
    OR
    copy required files to shadow build directory
    OR
    try to find way how to autocopy QSQl drivers to destination directory.

  5. #5
    Join Date
    May 2008
    Posts
    276
    Thanks
    13
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Qt Creator always weird

    I think there is something more odd.
    Beside not finding the option to switch off Active Shadow,
    I copied the sqldrivers folder in everyplace: in release, in debug in the root folder of the project.
    Same result.

Similar Threads

  1. Weird 1px line in QScrollArea
    By alexandernst in forum Qt Programming
    Replies: 0
    Last Post: 15th December 2010, 22:02
  2. Weird bug with SQLite
    By RavenS in forum Qt Programming
    Replies: 3
    Last Post: 28th March 2009, 17:45
  3. Weird Segfault...
    By chimby in forum Qt Programming
    Replies: 3
    Last Post: 22nd January 2009, 23:31
  4. weird error
    By mickey in forum General Programming
    Replies: 6
    Last Post: 18th November 2006, 04:22
  5. Weird compiler errors
    By MarkoSan in forum General Programming
    Replies: 13
    Last Post: 17th June 2006, 12:40

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.