PDA

View Full Version : Cannot open <qvbox.h>



KaKa
17th March 2007, 09:11
I was trying the codes in the tutorial

QT Tutorial #1---8 Preparing for Battle
(http://doc.trolltech.com/3.3/tutorial1-08.html)

in visual Studio 2005(with embedded QT designer integrated)

And the compilation gives me the following error: fatal error C1083: Cannot open include file: 'qvbox.h': No such file or directory.

I have included all the libraries in the Project Wizard->Project settings.

And other libraries such as qpainter.h worked fine.

I simply copied and pasted the whole code set from the website to the project, didn't change anything.

Is there any hint for the reason of the problem?

Thanks!!!

wysota
17th March 2007, 09:19
This is a tutorial for Qt3 and you're using Qt4. Try this instead: http://doc.trolltech.com/latest/tutorial-t8.html

KaKa
17th March 2007, 09:43
Thanks for the new 4.2 version address I really need it!

However the lcdrange still need qvbox, which is still not recognized and throw the same error.

:S

jpn
17th March 2007, 09:49
However the lcdrange still need qvbox, which is still not recognized and throw the same error.
Do you still have the files of the old example for Qt 3? Better grab all the files from the one for Qt 4. The example for Qt 4 uses QVBoxLayout.

KaKa
17th March 2007, 10:24
Thanks a lot!!!

I pasted the wrong code.

I have one more question though. I have been using Q3 libraries and functions in Q4, (since I was using the Q3 webpage :o )

And I am using the commercial trial based on the open source documentation..

Would the above two situations cause big problem. Can I still survive with these?

Thanks!!!

jpn
17th March 2007, 11:58
I have one more question though. I have been using Q3 libraries and functions in Q4, (since I was using the Q3 webpage :o )

And I am using the commercial trial based on the open source documentation..

Would the above two situations cause big problem. Can I still survive with these?
Qt3 and Qt4 APIs are pretty much different. So yes, you need to switch to the documentation of Qt4. :) I'd suggest checking out Qt Assistant shipped together with Qt. It's a great tool for exploring Qt reference documentation.

The differences between Qt4 commercial and open source version are at least the ActiveQt module and the Visual Studio integration. I can't remember for sure if there was something else too..

wysota
17th March 2007, 11:59
Commercial and open source versions use the same code and documentation, so there won't be any problems with these.