PDA

View Full Version : Help! about Qt for beginner!!



Cantora
31st March 2009, 08:45
I am very new in Qt.. Yesterday just done my setup for Qt.

I am using VS2005, Qt 4.5.0, MinGW-3.4.2, qt software integration

Can anyone tell me where should I start to catch up this programing?

I need to use Qt to create something like below print screen.


http://img27.imageshack.us/img27/9266/46465984.png

wysota
31st March 2009, 09:07
You should start by reading tutorials and examples bundled with the documentation. Once you get a grip of things, you can use Qwt for your histogram or implement your own custom widget, your usecase seems very simple.

Cantora
31st March 2009, 09:33
Hi,
Just now i am try to open a new Qt application project then follow the tutorial..
/************************************************** **************
**
** Qt tutorial 1
**
************************************************** **************/

#include <qapplication.h>
#include <qpushbutton.h>


int main( int argc, char **argv )
{
QApplication a( argc, argv );

QPushButton hello( "Hello world!", 0 );
hello.resize( 100, 30 );

a.setMainWidget( &hello );
hello.show();
return a.exec();
}

but i am fail to run my 1st Qt tutorial program :(
error msg is : >LINK : fatal error LNK1181: cannot open input file 'QAxServerd.lib'

i am not able how any related solution via google..

wysota
31st March 2009, 10:01
I'm sure the tutorial didn't tell you to link with QAxServerd.lib. You must have done something wrong. Did you use qmake to manage your project?

Cantora
31st March 2009, 10:43
Hi wysota,

I am found the problem already..

I am using vs2005 to create the Qt project. Previously, During the project setting I have include the ActiveQt server library and ActiveQt container library. Then i got the error msg about missing LIB file.

Just now I recreate a new project without include these 2 library then no more problem.

So means i cannot use "qaxserver.lib" or the Qt version I used no need to include the "qaxserver.lib"

I have find this link http://lists.trolltech.com/qt-interest/2004-02/thread01572-0.html. After I read it still very confuse with it.

Thank for you help in advanced :)

wysota
31st March 2009, 14:48
It means you should use qmake to manage your project. The AxServer is only available in the commercial edition of Qt and it seems you are using the open source one.

Cantora
1st April 2009, 06:13
thanks again! is there any ebook is for using Qt in vs 2005?

currently I am reading "C++-GUI-Programming-with-Qt-4-1st-ed.pdf".

I need to start develop my thing on this friday using vs2005 but now still very confuse.. :(
Hope can have more thing to be my reference..

wysota
1st April 2009, 09:03
The editor you use has no influence on Qt. Qt with visual studio is exactly the same as Qt with vi.

pdolbey
1st April 2009, 17:28
It means you should use qmake to manage your project. The AxServer is only available in the commercial edition of Qt and it seems you are using the open source one.

This has been discussed at http://labs.trolltech.com/forums/topic/516 - which refers to http://article.gmane.org/gmane.comp.lib.qt.general/11425/match=activeqt as a defintive source of truth from Thiago Macieira at QtSoftware.

The labs forum article shows some methods that can be used to compile ActiveQt libraries. I did it by changing one line in a the configure tool source code (and recompiling), and one line in qglobal.h (like in the labs forum). I leave it as an excercise for the reader to figure out what I changed in "configure" (I'm at work so I can't remember it in detail anyway). I haven't tried it yet, but it should work for the Oracle sql driver as well.

Pete

wysota
2nd April 2009, 01:11
I think the case here is that the library shouldn't be enabled at all, not that it didn't compile :) Although of course information about ActiveQt being BSD-licenced is a value in itself so thanks for that :)