Page 1 of 2 12 LastLast
Results 1 to 20 of 22

Thread: QT + Problem + execute

  1. #1
    Join Date
    Jan 2012
    Posts
    25
    Thanks
    10
    Qt products
    Qt4
    Platforms
    Windows

    Default QT + Problem + execute

    Hi,,
    Please, I really need help as soon as possible.
    I developed a Qt application that interacts with a SQL Server database. All goes well until today.
    I did not like my base so I decided to create another. What prompts me to change several instructions in all files of my code.
    When I run my code again, I found it full of errors (almost 45) and these are errors in files I've ever seen (no sources or headers or xml) I decided to dc drop the base change and I returned to the old version of my code (I ranking) but here: it's a surprise the same errors are dominated my own version (that one hour before it worked perfectly). I do not know what to do? I can not redo all the work because I have to drop this Saturday
    Please please help me (I apologize for this long story but I'm really stuck)

  2. #2
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: QT + Problem + execute

    Thank you for your long story. Would you care to share information that might actually tell us what sort of errors you are getting, where they are coming from etc.?

  3. The following user says thank you to ChrisW67 for this useful post:

    anouar2002 (20th January 2012)

  4. #3
    Join Date
    Jan 2012
    Posts
    25
    Thanks
    10
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QT + Problem + execute

    There are 45 error :
    most of them contains path
    For example :
    In file included
    c:\qtsdk\mingw\bin\..\lib\gcc\mingw32\4.4.0\includ e\c++\map:60: In file included from c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.4.0/include/c++/map:60,
    c:\QtSDK\Desktop\Qt\4.7.4\mingw\include\QtCore\qma p.h:50: from c:\QtSDK\Desktop\Qt\4.7.4\mingw\include/QtCore/qmap.h:50,
    c:\QtSDK\Desktop\Qt\4.7.4\mingw\include\QtCore\qva riant.h:49: from c:\QtSDK\Desktop\Qt\4.7.4\mingw\include/QtCore/qvariant.h:49,
    c:\QtSDK\Desktop\Qt\4.7.4\mingw\include\QtCore\qva riantanimation.h:48: from c:\QtSDK\Desktop\Qt\4.7.4\mingw\include/QtCore/qvariantanimation.h:48,
    ....
    bidirectionnel iterator_tag does not name a type
    c:\qtsdk\mingw\bin\..\lib\gcc\mingw32\4.4.0\includ e\c++\bits\stl_tree.h:159: erreur : 'bidirectional_iterator_tag' does not name a type
    .....
    expected type-specifier before 'allocator'
    c:\qtsdk\mingw\bin\..\lib\gcc\mingw32\4.4.0\includ e\c++\bits\stl_tree.h:321: erreur : expected type-specifier before 'allocator'
    .....
    and more..

  5. #4
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: QT + Problem + execute

    ... and what line of your code triggers these error messages? What are the lines around that line?

  6. #5
    Join Date
    Jan 2012
    Posts
    25
    Thanks
    10
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QT + Problem + execute

    the problem is those error are not in files that's i wrote it. But in some file .h , that first time i see them.

  7. #6
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: QT + Problem + execute

    Copy and paste the entire error message or at least the first 10 lines or so.

  8. #7
    Join Date
    Jan 2012
    Posts
    25
    Thanks
    10
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QT + Problem + execute

    c:\qtsdk\mingw\bin\..\lib\gcc\mingw32\4.4.0\includ e\c++\map:60: In file included from c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.4.0/include/c++/map:60,
    c:\QtSDK\Desktop\Qt\4.7.4\mingw\include\QtCore\qma p.h:50: from c:\QtSDK\Desktop\Qt\4.7.4\mingw\include/QtCore/qmap.h:50,
    c:\QtSDK\Desktop\Qt\4.7.4\mingw\include\QtCore\qva riant.h:49: from c:\QtSDK\Desktop\Qt\4.7.4\mingw\include/QtCore/qvariant.h:49,
    c:\QtSDK\Desktop\Qt\4.7.4\mingw\include\QtCore\qva riantanimation.h:48: from c:\QtSDK\Desktop\Qt\4.7.4\mingw\include/QtCore/qvariantanimation.h:48,
    c:\QtSDK\Desktop\Qt\4.7.4\mingw\include\QtCore\qpr opertyanimation.h:45: from c:\QtSDK\Desktop\Qt\4.7.4\mingw\include/QtCore/qpropertyanimation.h:45,
    c:\QtSDK\Desktop\Qt\4.7.4\mingw\include\QtCore\QtC ore:7: from c:\QtSDK\Desktop\Qt\4.7.4\mingw\include/QtCore/QtCore:7,
    c:\QtSDK\Desktop\Qt\4.7.4\mingw\include\QtGui\QtGu i:3: from c:\QtSDK\Desktop\Qt\4.7.4\mingw\include\QtGui/QtGui:3,
    D:\Project\Gestion-build-desktop-Qt_4_7_4_for_Desktop_-_MinGW_4_4__Qt_SDK__Debug\..\Gestion\details2.h:8: from ..\Gestion\/details2.h:8,
    D:\Project\Gestion-build-desktop-Qt_4_7_4_for_Desktop_-_MinGW_4_4__Qt_SDK__Debug\..\Gestion\details2.cpp: 1: from ..\Gestion\details2.cpp:1:
    c:\qtsdk\mingw\bin\..\lib\gcc\mingw32\4.4.0\includ e\c++\bits\stl_tree.h:159: erreur : 'bidirectional_iterator_tag' does not name a type
    c:\qtsdk\mingw\bin\..\lib\gcc\mingw32\4.4.0\includ e\c++\bits\stl_tree.h:231: erreur : 'bidirectional_iterator_tag' does not name a type
    c:\qtsdk\mingw\bin\..\lib\gcc\mingw32\4.4.0\includ e\c++\bits\stl_tree.h:321: erreur : expected type-specifier before 'allocator'
    c:\qtsdk\mingw\bin\..\lib\gcc\mingw32\4.4.0\includ e\c++\bits\stl_tree.h:321: erreur : expected '>' before 'allocator'
    c:\qtsdk\mingw\bin\..\lib\gcc\mingw32\4.4.0\includ e\c++\bits\stl_tree.h:551: erreur : typedef name may not be a nested-name-specifier
    c:\qtsdk\mingw\bin\..\lib\gcc\mingw32\4.4.0\includ e\c++\bits\stl_tree.h:551: erreur : expected ';' before '<' token
    c:\qtsdk\mingw\bin\..\lib\gcc\mingw32\4.4.0\includ e\c++\bits\stl_tree.h:552: erreur : typedef name may not be a nested-name-specifier
    c:\qtsdk\mingw\bin\..\lib\gcc\mingw32\4.4.0\includ e\c++\bits\stl_tree.h:552: erreur : expected ';' before '<' token
    c:\qtsdk\mingw\bin\..\lib\gcc\mingw32\4.4.0\includ e\c++\bits\stl_tree.h:649: erreur : 'reverse_iterator' does not name a type
    c:\qtsdk\mingw\bin\..\lib\gcc\mingw32\4.4.0\includ e\c++\bits\stl_tree.h:653: erreur : 'const_reverse_iterator' does not name a type
    c:\qtsdk\mingw\bin\..\lib\gcc\mingw32\4.4.0\includ e\c++\bits\stl_tree.h:657: erreur : 'reverse_iterator' does not name a type
    c:\qtsdk\mingw\bin\..\lib\gcc\mingw32\4.4.0\includ e\c++\bits\stl_tree.h:661: erreur : 'const_reverse_iterator' does not name a type
    c:\qtsdk\mingw\bin\..\lib\gcc\mingw32\4.4.0\includ e\c++\bits\stl_tree.h:685: erreur : expected ';' before '<' token
    c:\qtsdk\mingw\bin\..\lib\gcc\mingw32\4.4.0\includ e\c++\bits\stl_tree.h:759: erreur : expected ';' before '<' token
    c:\qtsdk\mingw\bin\..\lib\gcc\mingw32\4.4.0\includ e\c++\bits\stl_tree.h:762: erreur : expected ';' before '<' token*
    c:\qtsdk\mingw\bin\..\lib\gcc\mingw32\4.4.0\includ e\c++\bits\stl_tree.h:-1: In function 'bool Ui::std:perator==(const Ui::std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>&, const Ui::std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>&)':
    c:\qtsdk\mingw\bin\..\lib\gcc\mingw32\4.4.0\includ e\c++\bits\stl_tree.h:-1: In function 'bool Ui::std:perator<(const Ui::std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>&, const Ui::std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>&)':
    c:\qtsdk\mingw\bin\..\lib\gcc\mingw32\4.4.0\includ e\c++\bits\stl_tree.h:-1: In function 'bool Ui::std:perator<(const Ui::std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>&, const Ui::std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>&)':
    c:\qtsdk\mingw\bin\..\lib\gcc\mingw32\4.4.0\includ e\c++\bits\stl_tree.h:-1: At global scope:
    c:\qtsdk\mingw\bin\..\lib\gcc\mingw32\4.4.0\includ e\c++\bits\stl_tree.h:-1: At global scope:
    c:\qtsdk\mingw\bin\..\lib\gcc\mingw32\4.4.0\includ e\c++\bits\stl_tree.h:1043: erreur : expected constructor, destructor, or type conversion before '<' token
    c:\qtsdk\mingw\bin\..\lib\gcc\mingw32\4.4.0\includ e\c++\bits\stl_tree.h:1074: erreur : expected constructor, destructor, or type conversion before '<' token
    c:\qtsdk\mingw\bin\..\lib\gcc\mingw32\4.4.0\includ e\c++\bits\stl_tree.h:-1: In member function 'void Ui::std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::swap(Ui::std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>&)':
    c:\qtsdk\mingw\bin\..\lib\gcc\mingw32\4.4.0\includ e\c++\bits\stl_tree.h:1153: erreur : '__alloc_swap' is not a member of 'Ui::std'
    c:\qtsdk\mingw\bin\..\lib\gcc\mingw32\4.4.0\includ e\c++\bits\stl_tree.h:1153: erreur : expected primary-expression before '>' token
    c:\qtsdk\mingw\bin\..\lib\gcc\mingw32\4.4.0\includ e\c++\bits\stl_tree.h:1153: erreur : '::_S_do_it' has not been declared
    c:\qtsdk\mingw\bin\..\lib\gcc\mingw32\4.4.0\includ e\c++\bits\stl_tree.h:-1: At global scope:

  9. #8
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: QT + Problem + execute

    What is at or around line 8 of file ..\Gestion\/details2.h?

  10. #9
    Join Date
    Jan 2012
    Posts
    25
    Thanks
    10
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QT + Problem + execute

    sorry didn't unserstand ??

  11. #10
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: QT + Problem + execute

    The error message contains two lines that reference your source code. The files are ..\Gestion\/details2.h and ..\Gestion\details2.cpp (on your D drive).
    Your source code is the thing that changed... therefore we are looking for problems in that source that are cascading into other things that get included.


    Also, do a clean build: Build menu, Clean All followed by Build menu, Build All

  12. #11
    Join Date
    Jan 2012
    Posts
    25
    Thanks
    10
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QT + Problem + execute

    for the files details.h and details2.h, the error are on line 1 : #include "details2.h"
    and line 8 : #include <QtGui>

    ( i did a build and clean and nothing as result)

  13. #12
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: QT + Problem + execute

    What is on lines 1 through 7 of details2.h?

  14. #13
    Join Date
    Jan 2012
    Posts
    25
    Thanks
    10
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QT + Problem + execute

    #ifndef DETAILS2_H
    #define DETAILS2_H

    #include <QDialog>

    namespace Ui {
    class details2;
    #include <QtGui>

  15. #14
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: QT + Problem + execute

    My best guess at this point is that you need to close the namespace:
    Qt Code:
    1. #ifndef DETAILS2_H
    2. #define DETAILS2_H
    3.  
    4. #include <QDialog>
    5.  
    6. namespace Ui {
    7. class details2;
    8. } // <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< this line missing
    9.  
    10. #include <QtGui>
    To copy to clipboard, switch view to plain text mode 

  16. #15
    Join Date
    Jan 2012
    Posts
    25
    Thanks
    10
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QT + Problem + execute

    there is } :
    Qt Code:
    1. #ifndef DETAILS2_H
    2. #define DETAILS2_H
    3.  
    4. #include <QDialog>
    5.  
    6. namespace Ui {
    7. class details2;
    8.  
    9. #include <QtGui>
    10. #include <QtSql>
    11. #include <QtCore>
    12.  
    13. }
    To copy to clipboard, switch view to plain text mode 

  17. #16
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: QT + Problem + execute

    Move it unless you really want to try to put qt into the Ui namespace.

  18. #17
    Join Date
    Jan 2012
    Posts
    25
    Thanks
    10
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QT + Problem + execute

    I move it but another error comes at line 67 : else without a previous if
    but there is a if ,,,???????????
    Qt Code:
    1. qry.bindValue(":Code_Barre",numero);
    2. qry.bindValue(":Nom_Lot",nom);
    3. qry.bindValue(":Fiche_Allocation",fiche);
    4. qry.bindValue(":Id_Casier",valeur);
    5. if(qry.exec()){
    6.  
    7. QMessageBox::information(this,"Information","L'operation d'ajout a été réalisée avec succèss !");
    8. ui->lineEdit->clear();
    9. ui->lineEdit_2->clear();
    10. ui->lineEdit_3->clear();}
    11. ui->comboBox->setCurrentIndex(0);
    12. /*line 67*/ else {
    13.  
    14. QMessageBox::warning(this,"Erreur","L'operation d'ajout a rencontré un problème !");
    15.  
    16. }
    To copy to clipboard, switch view to plain text mode 

  19. #18
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: QT + Problem + execute

    Look harder at line 10!

  20. #19
    Join Date
    Jan 2012
    Posts
    25
    Thanks
    10
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QT + Problem + execute

    i correct many errors ( i don't know from where they comes ) but now : Error is
    The program ended suddenly.

  21. #20
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: QT + Problem + execute

    Run the program in a debugger. When it crashes look at the backtrace. I do not intend to hand hold you through fixing every little quirk in your code.

  22. The following user says thank you to ChrisW67 for this useful post:

    anouar2002 (20th January 2012)

Similar Threads

  1. How to execute my .css file in Qt?
    By harish in forum Qt Programming
    Replies: 5
    Last Post: 2nd December 2011, 11:12
  2. How to execute a QProgressDialog once
    By franco.amato in forum Newbie
    Replies: 4
    Last Post: 16th March 2010, 16:36
  3. Can execute examples
    By gyre in forum Qwt
    Replies: 12
    Last Post: 26th February 2010, 08:51
  4. Replies: 2
    Last Post: 5th March 2008, 10:39
  5. How to Execute Qt script from Qt
    By vishal.chauhan in forum Qt Programming
    Replies: 1
    Last Post: 7th May 2007, 09:12

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.