[kde-linux] how to link database MYSQL in QT Designer

Sylviane et Perry White spwhite at freesurf.ch
Sun Jun 25 15:24:10 UTC 2006


On Saturday 24 June 2006 10:15, Dominique Wong wrote:
> Hello,I am tring to link mysql database in QT Desinger.I have both Mysql
(snip)
> the version of QT Designer is 3.1.
> I aims to make a GUI,this GUI contains a tree/list ,and I want to show
> information from database in MySql in that tree/list. Since I never
> did a Linux GUI project,especially with a database,so this really
> harasses me a lot.
(snip)
> I start QT Designer in Kdevelop,and do not know how to add QT Designer
> generated .ui file into my Kdevelop project.Could you give a more detailed
> explanation,thank you so much.

Hi Wong,

I never used Kdevelop but I made Qt programs with Developper, its integrated 
editor ( or kate for version 4) and the shell.

With Designer version 3 I first create a project  (Hello.pro)
Then I create a dialog or main form or widget and add it to the project.
Then write menus, place some stuff on the form, make connections, write some 
code
Ask Designer to write a main.cpp file...save all.

Finally from a shell, I cd into that dir, and type the commands:
->qmake Hello.pro		this will generate a Makefile
->make				this will "uic" your .ui file and generate .h and .cpp files 
					and also do the "mocing"  ( moc_Hello.cpp )
					compile, link and produce the executable.
That's all  ;0)


I suggest you first try to make a very simple program, look at the tutorial 
and examples, use "assistant"... before dealing with MySql.

Happy coding		Perry

P.S.   Thanks Kevin
> Designer has some database aware widgets available

-- 
BOFH excuse #397: T1's congested due to porn traffic to the news server



More information about the kde-linux mailing list