I suggest you improve your C++ skills a bit before taking on Qt.
hello ,
i realized that my problem have no relation with my code.
in fact a simple application like "simple_plot" works normally when i create a new project ,move sources and modify *.pro ,but when i do the same for other example like "real_time plot" and try to build it , i have the same problem with a warning(exited with code -1073741819 ,no errors ,warning: #warning better use QwtData) and degugger don't works anymore .
so it's a configuration problem .
i downloaded qwt 5.2 from svn but it's the same problem !
-each time i want to run my application from Qt console or from Qt creator i have to add qwtd5.dll to debug folder,everybody do that ?
-i want to buid Qt in debug mode ,it takes time ,finally it generate errors related with visual studio 2008
-why to build Qt in debug mode?
-mingw's gdb isn't enough to debug Qt applications since we're using Qt's sources ?
-what about .pri and .prf ? should i modify one ?
-why debugger under Qt creator works(just for an application without macro Q_OBJECT) even if Qt isn't buit in debug mode ?
please look up my .pro
if my questions proves that i'm lost ,some links will be enough to stop annoying you .
regards
Last edited by oswalidos; 11th March 2009 at 19:55.
sorry ,my problem have no relation with c++ ,i didn't separate my files to .h and .cpp simply cuz i'm still testing qwt(that what makes you think i need to improve my c++ skills?) .
i'm sure my c++'s skills allows me to use Qt,it doesn't need a c++ expert !
anyway thanks for your help and advices .
Last edited by oswalidos; 11th March 2009 at 20:43.
my .pro for the real_time_plot :
Qt Code:
TARGET = QDSQ TEMPLATE = app DEPENDPATH += . INCLUDEPATH += C:\Qwt-5.2.0-svn\include LIBS += C:\Qwt-5.2.0-svn\lib\qwtd5.dll CONFIG +=debug HEADERS += scrollzoomer.h \ scrollbar.h \ randomplot.h \ mainwindow.h \ incrementalplot.h SOURCES += scrollzoomer.cpp \ scrollbar.cpp \ realtime.cpp \ randomplot.cpp \ mainwindow.cpp \ incrementalplot.cpp OTHER_FILES += start.xpm \ clear.xpTo copy to clipboard, switch view to plain text mode
No, you can place the library in any place the dynamic linker will be looking for it. The directory where the application binary resides is one of those places but not the only one.
So that you can peek inside internal Qt library calls.-why to build Qt in debug mode?
Yes, it is. But it won't tell you much without debugging symbols. Such an experienced C++ programmer as yourself should know that-mingw's gdb isn't enough to debug Qt applications since we're using Qt's sources ?
What for?-what about .pri and .prf ? should i modify one ?
See the answer above.-why debugger under Qt creator works(just for an application without macro Q_OBJECT) even if Qt isn't buit in debug mode ?
but if i move dll to other directory,i can't run executable ,error :exited with code -1073741819 .
anyway,my problem is how to buid any application with no error ,the code of real_time_plot must work with no error !
so could you tell me if there is a problem with my .pro ?
i found here :
i can't do like he said , i can't got what he mean :Originally Posted by Uwe
-if you're working with dll
- qwt tarball
-qwt.prf
thanks for your help
The application probably picks up another version of the library that resides somewhere in your system.
Your application builds without error. It just doesn't run. That's two different things.anyway,my problem is how to buid any application with no error ,the code of real_time_plot must work with no error !
No, your pro is fine.so could you tell me if there is a problem with my .pro ?
What do you mean you can't do it?i can't do like he said , i can't got what he mean :
-if you're working with dll
- qwt tarball
-qwt.prf
i installed Qt 4.4 and 4.5 and qwt 5.1.1 and 5.3 and 5.2 and visual studio 2008 and 2 or 3 mingw ,so my environnement can get confused ?
i don't have :Originally Posted by wysota
DEFINES += QWT_DLL
CONFIG += qwt
in my pro ,i can't do that cuz i don't understand why should i do that , in addition i tried but it makes other problems
thanks again
If the guy tells you to do it, then do it. If you have problems, it means you have to solve them. Those statements initialize the use of Qwt in your application.
I suggest you uninstall everything and start from scratch slowly, without shooting blind. Install one development environment and one Qt version. Then install one version of Qwt (follow the install guide that comes with Qwt), add what's needed to your project file and then start developing software based on Qwt.
ok ,i'll restart everything ,by the way the guy didn't tell me,i found it somewhere
thanks for your help
hi again ,
i restart everything and my news :
-able to debug my application with visual c++ debugger (given with Qt creator)
-i downlaod mingw while i'm installing Qt 4.5 .
-is it normal to don't use the mingw debugger ? (anyway it works)
-i still have to copy qwtd5.dll to debug folder of my application ,otherwise with debugging i got a runtime error ! (can you help me for that ?)
-i can back now to my problem : displaying point by point a curve .
now the code i posted works with no error but the curve don't appear point by point ,first time no curve ,after some seconds i have to refresh the window to see the curve .
i think if Qt run only one thread(i can see that in debugger) for my application i can't get what want ,i may should create a thread for the methode which call timer ,to get two parellel threads ,one to show the window and second takes care of the timer and giving data .
am i right?
thanks for your help
No, you are wrong. See the attachment.
About the DLL - place it in your Windows\System32 folder or along other Qt DLL files.
oswalidos (13th March 2009)
it was a nice conversation
coping my dll under system32 solve the problem.
about code i have just to put replot(); in the right places and it works :
think you so much for your helpQt Code:
void Plot::onTimeout(){ //each timeout data will currentPointPosition++; // be added to the curve if(currentPointPosition>1000) currentPointPosition = 1; curve->setData(x, y, currentPointPosition); replot(); } void Plot::pointByPoint(){ //calling this method provoque painting curve "slowly" for(int i=0;i<1000;i++){ timer->start(10); } } //in constructor connect(timer, SIGNAL(timeout()), this, SLOT(onTimeout())); // add curves curve->attach(this); currentPointPosition=1; curve->setData(x, y, currentPointPosition); replot();To copy to clipboard, switch view to plain text mode
how to mark this thread as solved ?
Bookmarks