freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

基于qt局域網(wǎng)聊天系統(tǒng)(參考版)

2024-12-08 04:35本頁面
  

【正文】 uitextEditappend(tmp)。 } 通信模塊 通信模塊主要使用 UDP 與相應(yīng)的好友驚喜通信 關(guān)鍵代碼如下: void MyClient::recvMsg() { QByteArray tmp。 chatDlg = new Chat(id)。 } UserList::on_tableWidget_itemDoubleClicked(QTableWidgetItem *item) { state = itemrow()。 QHeaderView *header = uitableWidgethorizontalHeader()。uitableWidgetsetSelectionBehavior(QAbstractItemView::SelectRows)。 uitableWidgetsetColumnWidth(2,80)。 } uitableWidgetsetColumnWidth(0,80)。 uitableWidgetsetItem(i,1,id)。 QTableWidgetItem *state2 = new QTableWidgetItem((i))。 QTableWidgetItem *id = new QTableWidgetItem((i))。i ()。i++) { uitableWidgetremoveRow(0)。 for(int i = 0。 thisstateList = statelist。 } } void UserList::updateList(QStringList idlist, QStringList nicklist, QStringList statelist) { thisidList = idlist。 in idList2 nickList2 stateList2。 QStringList nickList2。 華東交通大學(xué)理工學(xué)院畢業(yè)設(shè)計(jì) 35 insizemsgType。block,QIODevice::ReadOnly)。peerPort)。 thisudpsocketreadDatagram((),(),amp。 quint16 peerPort。 quint16 size。 } } void UserList::readDatagrams() { QByteArray block。 udpsocketwriteDatagram((), (), QHostAddress(ip), (quint16)()+1)。 ()seek(0)。 (QDataStream::Qt_4_7)。 QDataStream out(amp。 QString msgType = OFF_LINE。 if(button == QMessageBox::No) { eventignore()。 華東交通大學(xué)理工學(xué)院畢業(yè)設(shè)計(jì) 34 } void UserList::closeEvent(QCloseEvent *event) { QMessageBox::StandardButton button。 insizemsgType。block,QIODevice::ReadOnly)。peerPort)。 thisudpsocketreadDatagram((),(),amp。 quint16 peerPort。 quint16 size。} void UserList::recvMsg() { QByteArray block。 out (quint16)0 msgType。block, QIODevice::WriteOnly)。 QByteArray block。 udpsocketbind(6666)。 } UserList::~UserList() {//////////////// UDP Send OFF_LINE msg ///////////////// delete ui。 udpsocketbind(6666)。 updateList(idlist,nicklist,statelist)。 thisclose()。 socketwrite(block)。 ()seek(0)。 (QDataStream::Qt_4_7)。 QDataStream out(amp。 QString msgType = REGISTER。 } else { socketabort()。} else if((passwd != passwd2) || () == 0) { QMessageBox::warning(NULL,QObject::tr(Warning),QObject::tr(Passwd error))。 (QRegExp::RegExp)。 QString nickname = uilineEdit_4text().trimmed()。 QString passwd = uilineEdit_2text().trimmed()。 thisclose()。} if(msgType == REGISTER_SUCCESS) { QMessageBox::information(NULL,QObject::tr(register success),QObject::tr(register success))。 qDebug() datagramSize ** msgType。 QString msgType。 (QDataStream::Qt_4_7)。 QDataStream in(amp。} void Register::recvMsg() { 華東交通大學(xué)理工學(xué)院畢業(yè)設(shè)計(jì) 31 QByteArray block。 connect(socket,SIGNAL(readyRead()),this,SLOT(recvMsg()))。 socket = new QTcpSocket(this)。 thisip = ip。 uitoolButton_4setChecked(true)。 } void Client::on_pushButton_5_clicked() { thisclose()。 socketclose()。 listDlgshow()。i++) { if((i) == listDlgmyId) { listDlgmyNick = (i)。 for(int i = 0。 listDlgport = port。 listDlg = new UserList(idList,nickList,stateList)。 } else if(msgType == LOGIN _FAILED) { QMessageBox::warning(NULL,warning,login failed)。 QMessageBox::information(NULL,information,login success)。 QStringList stateList。 if(msgType == UPDATE) { QStringList idList。 in datagramSize msgType。 quint16 datagramSize。block,QIODevice::ReadOnly)。 block = socketreadAll()。 registerDlgshow()。 socketwrite(block)。 ()seek(0)。 (QDataStream::Qt_4_7)。 QDataStream out(amp。 QString msgType = LOGIN。//關(guān)閉套接字,并且重新設(shè)置套接字 socketconnectToHost(QHostAddress(ip),(quint16)())。 passwd = uilineEdit_2text()。 uitoolButton_4setCheckable(true)。 thisresize(366,231)。 } } ////////////////////Setting_Ensure PushButton/////////////////////// 華東交通大學(xué)理工學(xué)院畢業(yè)設(shè)計(jì) 28 void Client::on_pushButton_6_clicked() { ip = uilineEdit_3text()。 thisresize(366,409)。 } else { qDebug() 222。 thisresize(366,231)。 } ////////////////////Setting_PushButton ////////////////////////////// void Client::on_toolButton_4_clicked() { if(checked) { qDebug() 111。 checked = 0。 uilineEdit_3setText()。 thisresize(366,231)。 } } 客戶端登錄模塊 include include include QDebug include QDataStream include QHostAddress include QMessageBox include QHBoxLayout 華東交通大學(xué)理工學(xué)院畢業(yè)設(shè)計(jì) 27 include QTableView Client::Client(QWidget *parent) : QMainWindow(parent), ui(new Ui::Client) { uisetupUi(this)。 return。off39。off39。 } else if(button == QMessageBox::Yes) { QSqlQuery query2。 button = QMessageBox::question(this,tr(waring), Are you going to disconnect the Server?, QMessageBox::Yes|QMessageBox::No)。 displayView()。 return。 out (quint16)(() sizeof(quint16))。 out (quint16)0 msgType idList nickList stateList。block,QIODevice::WriteOnly)。 QByteArray block。 on_pushButton_clicked()。 ((2).toString())。 while(()) { ((0).toString())。 ()。 } (select username,nickname,state from scooter)。 where username=:username))。 if(!()) { QMessageBox::critical(NULL,error,exec
點(diǎn)擊復(fù)制文檔內(nèi)容
研究報(bào)告相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1