April 13, 2012

XLeopard XLeopard
Lab Rat
25 posts

[Solved] Qt Programming in VS2008

 

I’m reading C++ GUI Programming with Qt4,Second Edition.
When I ran the example in chapter3(spreadsheet), the outcome was not in accord with the code.
It didn’t have menu and toolbar.But I had run it in Qt2010.05 before.
It had menu that time. Does the difference of IDEs make trouble or something else?

[edit] marked as solved, koahnig

4 replies

April 13, 2012

koahnig koahnig
Gene Splicer
2907 posts

welcome to devnet

In general there should be no difference originating from the IDE. Sometimes there might be differences from the compiler you are using because of conditional compiling directives. this is in cases something is excluded for specific compiler though.

With Qt2010.05 you mean you have used Qt creator?

April 13, 2012

XLeopard XLeopard
Lab Rat
25 posts

I used it not too long ago and tried several different editions.
But There was something wrong with OpenGL.
It advised me that I must include winXX.h files in the Qt \desttop\qtcore\msvc2008\.
I attemped to add them at first. But There were too much files it needed.
So I think it had relations with my OS. Then I surfed the Internet to find some solutions.
At last, I found Qt + VS2008.
And just know, the simplest codes turned wrong.

In addition,what I really want is to learn OpenGL.

April 14, 2012

XLeopard XLeopard
Lab Rat
25 posts

I’m really sorry for bothering you.
I checked my codes again this morning and found that there was only one error in main.cpp, where only spreadsheet.cpp and QtGUI were included. But I did know that all the .h files were
included in mainwindow.h. So I added mainwindow.cpp instead of spreadsheet.cpp in the main.cpp. Finally it works. I do appreciate that you could help me when I was helpless.

April 15, 2012

koahnig koahnig
Gene Splicer
2907 posts

No problem. Glad to hear that your problem has been solved.

Sometimes we overlook some simple things over and over again.

Please mark your thread as solved next time.

 
  ‹‹ Capturing MJPEG      setData(int role,const QVariant) Data(int role) ››

You must log in to post a reply. Not a member yet? Register here!