-
大小: 729KB文件類型: .rar金幣: 1下載: 0 次發(fā)布日期: 2021-01-08
- 語言: 數(shù)據(jù)庫
- 標簽: QT4??MySQL??
資源簡介
基于QT4與MySQL的校園點菜系統(tǒng)的實現(xiàn),初學(xué)者學(xué)習(xí)范例。
代碼片段和文件信息
/********************************************************************************
*?File?Name: main.cpp
*?Description: 第10章實例訓(xùn)練??????????
*?Reference?book:《Linux環(huán)境下Qt4圖形界面與MySQL編程》,機械工業(yè)出版社.2012.1??
*?E_mail:?openlinux2011@gmail.com ????????????????
*
********************************************************************************/
#include?
#include?
#include?
#include?“mainwindow.h“
//連接數(shù)據(jù)庫
bool?createConnection()
{
????QSqlDatabase?db?=QSqlDatabase::addDatabase(“QMYSQL“);?//連接數(shù)據(jù)庫驅(qū)動
????db.setUserName(“root“);???//用戶名
????db.setPassword(“123456“);??//密碼
????db.setHostName(“l(fā)ocalhost“);?//數(shù)據(jù)庫所在主機的IP,此處數(shù)據(jù)庫存在本地
????db.setDatabaseName(“DinnerSystem“);???//數(shù)據(jù)庫名
????db.setPort(3306);???//端口
????if(!db.open())?//打開數(shù)據(jù)庫
????{
????????qDebug()<<“open?faile\
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件????????363??2011-10-27?10:59??第10章?基于QT4與MySQL的校園點菜系統(tǒng)\DinnerSystem\data.txt
?????文件????1513433??2011-10-27?19:22??第10章?基于QT4與MySQL的校園點菜系統(tǒng)\DinnerSystem\DinnerSystem
?????文件????????573??2011-10-27?15:13??第10章?基于QT4與MySQL的校園點菜系統(tǒng)\DinnerSystem\DinnerSystem.pro
?????文件??????68474??2011-10-27?16:39??第10章?基于QT4與MySQL的校園點菜系統(tǒng)\DinnerSystem\DinnerSystem.pro.user
?????文件?????252652??2011-04-13?21:31??第10章?基于QT4與MySQL的校園點菜系統(tǒng)\DinnerSystem\images\22.png
?????文件???????3675??2007-10-16?10:28??第10章?基于QT4與MySQL的校園點菜系統(tǒng)\DinnerSystem\images\4.png
?????文件???????2037??2010-04-18?23:52??第10章?基于QT4與MySQL的校園點菜系統(tǒng)\DinnerSystem\images\end.png
?????文件???????1403??2011-12-28?09:46??第10章?基于QT4與MySQL的校園點菜系統(tǒng)\DinnerSystem\main.cpp
?????文件???????4055??2011-12-28?09:46??第10章?基于QT4與MySQL的校園點菜系統(tǒng)\DinnerSystem\mainwindow.cpp
?????文件???????1069??2011-12-28?09:46??第10章?基于QT4與MySQL的校園點菜系統(tǒng)\DinnerSystem\mainwindow.h
?????文件???????7362??2011-10-26?20:17??第10章?基于QT4與MySQL的校園點菜系統(tǒng)\DinnerSystem\mainwindow.ui
?????文件??????13025??2011-10-27?15:13??第10章?基于QT4與MySQL的校園點菜系統(tǒng)\DinnerSystem\Makefile
?????文件???????7180??2011-04-13?19:50??第10章?基于QT4與MySQL的校園點菜系統(tǒng)\DinnerSystem\release\main.o
?????文件??????29468??2011-04-13?20:00??第10章?基于QT4與MySQL的校園點菜系統(tǒng)\DinnerSystem\release\mainwindow.o
?????文件???????8012??2011-04-13?19:51??第10章?基于QT4與MySQL的校園點菜系統(tǒng)\DinnerSystem\release\menulist.o
?????文件???????2148??2011-04-13?19:51??第10章?基于QT4與MySQL的校園點菜系統(tǒng)\DinnerSystem\release\moc_mainwindow.cpp
?????文件???????6736??2011-04-13?19:51??第10章?基于QT4與MySQL的校園點菜系統(tǒng)\DinnerSystem\release\moc_mainwindow.o
?????文件???????1887??2011-04-13?19:51??第10章?基于QT4與MySQL的校園點菜系統(tǒng)\DinnerSystem\release\moc_menulist.cpp
?????文件???????7776??2011-04-13?19:51??第10章?基于QT4與MySQL的校園點菜系統(tǒng)\DinnerSystem\release\moc_menulist.o
?????文件???????1836??2011-04-13?19:51??第10章?基于QT4與MySQL的校園點菜系統(tǒng)\DinnerSystem\release\moc_order.cpp
?????文件???????7696??2011-04-13?19:51??第10章?基于QT4與MySQL的校園點菜系統(tǒng)\DinnerSystem\release\moc_order.o
?????文件???????1921??2011-04-13?19:51??第10章?基于QT4與MySQL的校園點菜系統(tǒng)\DinnerSystem\release\moc_stuaddlist.cpp
?????文件???????7836??2011-04-13?19:51??第10章?基于QT4與MySQL的校園點菜系統(tǒng)\DinnerSystem\release\moc_stuaddlist.o
?????文件???????2653??2011-04-13?19:51??第10章?基于QT4與MySQL的校園點菜系統(tǒng)\DinnerSystem\release\moc_welcomeAdmin.cpp
?????文件???????8676??2011-04-13?19:51??第10章?基于QT4與MySQL的校園點菜系統(tǒng)\DinnerSystem\release\moc_welcomeAdmin.o
?????文件???????2614??2011-04-13?19:51??第10章?基于QT4與MySQL的校園點菜系統(tǒng)\DinnerSystem\release\moc_welcomeStu.cpp
?????文件???????9648??2011-04-13?19:51??第10章?基于QT4與MySQL的校園點菜系統(tǒng)\DinnerSystem\release\moc_welcomeStu.o
?????文件???????3066??2011-04-13?19:51??第10章?基于QT4與MySQL的校園點菜系統(tǒng)\DinnerSystem\release\moc_welcomeWorker.cpp
?????文件???????9124??2011-04-13?19:51??第10章?基于QT4與MySQL的校園點菜系統(tǒng)\DinnerSystem\release\moc_welcomeWorker.o
?????文件??????11304??2011-04-13?19:51??第10章?基于QT4與MySQL的校園點菜系統(tǒng)\DinnerSystem\release\order.o
............此處省略26個文件信息
評論
共有 條評論