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.?
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..
Re: QT + Problem + execute
... and what line of your code triggers these error messages? What are the lines around that line?
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.
Re: QT + Problem + execute
Copy and paste the entire error message or at least the first 10 lines or so.
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::operator==(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::operator<(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::operator<(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:
Re: QT + Problem + execute
What is at or around line 8 of file ..\Gestion\/details2.h?
Re: QT + Problem + execute
sorry didn't unserstand ??
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
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)
Re: QT + Problem + execute
What is on lines 1 through 7 of details2.h?
Re: QT + Problem + execute
#ifndef DETAILS2_H
#define DETAILS2_H
#include <QDialog>
namespace Ui {
class details2;
#include <QtGui>
Re: QT + Problem + execute
My best guess at this point is that you need to close the namespace:
Code:
#ifndef DETAILS2_H
#define DETAILS2_H
#include <QDialog>
namespace Ui {
class details2;
} // <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< this line missing
#include <QtGui>
Re: QT + Problem + execute
there is } :
Code:
#ifndef DETAILS2_H
#define DETAILS2_H
#include <QDialog>
namespace Ui {
class details2;
#include <QtGui>
#include <QtSql>
#include <QtCore>
}
Re: QT + Problem + execute
Move it unless you really want to try to put qt into the Ui namespace.
Re: QT + Problem + execute
I move it but another error comes at line 67 : else without a previous if
but there is a if ,,,???????????
Code:
qry.bindValue(":Code_Barre",numero);
qry.bindValue(":Nom_Lot",nom);
qry.bindValue(":Fiche_Allocation",fiche);
qry.bindValue(":Id_Casier",valeur);
if(qry.exec()){
QMessageBox::information(this,
"Information",
"L'operation d'ajout a été réalisée avec succèss !");
ui->lineEdit->clear();
ui->lineEdit_2->clear();
ui->lineEdit_3->clear();}
ui->comboBox->setCurrentIndex(0);
/*line 67*/ else {
QMessageBox::warning(this,
"Erreur",
"L'operation d'ajout a rencontré un problème !");
}
Re: QT + Problem + execute
Re: QT + Problem + execute
i correct many errors ( i don't know from where they comes ) but now : Error is
The program ended suddenly.
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.