QT版聊天软件


该代码运行在qt5环境下,在win10,win8.1下运行通过。这是一个简单的聊天软件的实现,聊天通过UDP,文件传输通过TCP.最终可实现在不同主机间进行聊天绘画
资源截图
代码片段和文件信息
/****************************************************************************
** meta object code from reading C++ file ‘client.h‘
**
** Created by: The Qt meta object Compiler version 67 (Qt 5.4.0)
**
** WARNING! All changes made in this file will be lost!
*****************************************************************************/

#include “../../MyselfQQ/client.h“
#include 
#include tatype.h>
#if !defined(Q_MOC_OUTPUT_REVISION)
#error “The header file ‘client.h‘ doesn‘t include ject>.“
#elif Q_MOC_OUTPUT_REVISION != 67
#error “This file was generated using the moc from 5.4.0. It“
#error “cannot be used with the include files from this version of Qt.“
#error “(The moc has changed too much.)“
#endif

QT_BEGIN_MOC_NAMESPACE
struct qt_meta_stringdata_Client_t {
    QByteArrayData data[8];
    char stringdata[107];
};
#define QT_MOC_LITERAL(idx ofs len) 
    Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET(len 
    qptrdiff(offsetof(qt_meta_stringdata_Client_t stringdata) + ofs 
        - idx * sizeof(QByteArrayData)) 
    )
static const qt_meta_stringdata_Client_t qt_meta_stringdata_Client = {
    {
QT_MOC_LITERAL(0 0 6) // “Client“
QT_MOC_LITERAL(1 7 7) // “newConn“
QT_MOC_LITERAL(2 15 0) // ““
QT_MOC_LITERAL(3 16 7) // “readMsg“
QT_MOC_LITERAL(4 24 10) // “displayerr“
QT_MOC_LITERAL(5 35 28) // “QAbstractSocket::SocketError“
QT_MOC_LITERAL(6 64 21) // “on_cCancleBtn_clicked“
QT_MOC_LITERAL(7 86 20) // “on_cCloseBtn_clicked“

    }
    “ClientnewConnreadMsgdisplayerr“
    “QAbstractSocket::SocketError“
    “on_cCancleBtn_clickedon_cCloseBtn_clicked“
};
#undef QT_MOC_LITERAL

static const uint qt_meta_data_Client[] = {

 // content:
       7       // revision
       0       // classname
       0    0 // classinfo
       5   14 // methods
       0    0 // properties
       0    0 // enums/sets
       0    0 // constructors
       0       // flags
       0       // signalCount

 // slots: name argc parameters tag flags
       1    0   39    2 0x08 /* Private */
       3    0   40    2 0x08 /* Private */
       4    1   41    2 0x08 /* Private */
       6    0   44    2 0x08 /* Private */
       7    0   45    2 0x08 /* Private */

 // slots: parameters
    QmetaType::Void
    QmetaType::Void
    QmetaType::Void 0x80000000 | 5    2
    QmetaType::Void
    QmetaType::Void

       0        // eod
};

void Client::qt_static_metacall(Qobject *_o Qmetaobject::Call _c int _id void **_a)
{
    if (_c == Qmetaobject::InvokemetaMethod) {
        Client *_t = static_cast(_o);
        switch (_id) {
        case 0: _t->newConn(); break;
        case 1: _t->readMsg(); break;
        case 2: _t->displayerr((*reinterpret_cast< QAbstractSocket::SocketError(*)>(_a[1]))); break;
        case 3: _t->on_cCancleBtn_clicked(); break;

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件     364079  2015-04-14 12:24  CH18uild-MyselfQQ-Desktop_Qt_5_4_0_MinGW_32bit-Debugdebugclient.o

     文件     193061  2015-04-14 12:24  CH18uild-MyselfQQ-Desktop_Qt_5_4_0_MinGW_32bit-Debugdebugdrawer.o

     文件     331182  2015-04-14 12:24  CH18uild-MyselfQQ-Desktop_Qt_5_4_0_MinGW_32bit-Debugdebugmain.o

     文件       4684  2015-04-14 12:24  CH18uild-MyselfQQ-Desktop_Qt_5_4_0_MinGW_32bit-Debugdebugmoc_client.cpp

     文件     231620  2015-04-14 12:24  CH18uild-MyselfQQ-Desktop_Qt_5_4_0_MinGW_32bit-Debugdebugmoc_client.o

     文件       4849  2015-04-14 12:24  CH18uild-MyselfQQ-Desktop_Qt_5_4_0_MinGW_32bit-Debugdebugmoc_drawer.cpp

     文件     187575  2015-04-14 12:24  CH18uild-MyselfQQ-Desktop_Qt_5_4_0_MinGW_32bit-Debugdebugmoc_drawer.o

     文件       5146  2015-04-14 12:24  CH18uild-MyselfQQ-Desktop_Qt_5_4_0_MinGW_32bit-Debugdebugmoc_server.cpp

     文件     195341  2015-04-14 12:24  CH18uild-MyselfQQ-Desktop_Qt_5_4_0_MinGW_32bit-Debugdebugmoc_server.o

     文件       6722  2015-04-14 12:24  CH18uild-MyselfQQ-Desktop_Qt_5_4_0_MinGW_32bit-Debugdebugmoc_widget.cpp

     文件     361415  2015-04-14 12:24  CH18uild-MyselfQQ-Desktop_Qt_5_4_0_MinGW_32bit-Debugdebugmoc_widget.o

     文件    2753025  2015-04-14 12:27  CH18uild-MyselfQQ-Desktop_Qt_5_4_0_MinGW_32bit-DebugdebugMyselfQQ.exe

     文件     641933  2015-04-14 12:24  CH18uild-MyselfQQ-Desktop_Qt_5_4_0_MinGW_32bit-Debugdebugqrc_images.cpp

     文件     127402  2015-04-14 12:24  CH18uild-MyselfQQ-Desktop_Qt_5_4_0_MinGW_32bit-Debugdebugqrc_images.o

     文件     442815  2015-04-14 12:24  CH18uild-MyselfQQ-Desktop_Qt_5_4_0_MinGW_32bit-Debugdebugserver.o

     文件     611165  2015-04-14 12:24  CH18uild-MyselfQQ-Desktop_Qt_5_4_0_MinGW_32bit-Debugdebugwidget.o

     文件      20349  2015-04-14 12:24  CH18uild-MyselfQQ-Desktop_Qt_5_4_0_MinGW_32bit-DebugMakefile

     文件      83177  2015-04-14 12:24  CH18uild-MyselfQQ-Desktop_Qt_5_4_0_MinGW_32bit-DebugMakefile.Debug

     文件      83358  2015-04-14 12:24  CH18uild-MyselfQQ-Desktop_Qt_5_4_0_MinGW_32bit-DebugMakefile.Release

     文件        210  2015-04-14 12:24  CH18uild-MyselfQQ-Desktop_Qt_5_4_0_MinGW_32bit-Debugobject_script.MyselfQQ.Debug

     文件        230  2015-04-14 12:24  CH18uild-MyselfQQ-Desktop_Qt_5_4_0_MinGW_32bit-Debugobject_script.MyselfQQ.Release

     文件       2969  2015-04-14 12:24  CH18uild-MyselfQQ-Desktop_Qt_5_4_0_MinGW_32bit-Debugui_client.h

     文件       3345  2015-04-14 12:24  CH18uild-MyselfQQ-Desktop_Qt_5_4_0_MinGW_32bit-Debugui_server.h

     文件      12751  2015-04-14 12:24  CH18uild-MyselfQQ-Desktop_Qt_5_4_0_MinGW_32bit-Debugui_widget.h

     文件       3297  2015-04-14 12:24  CH18MyselfQQclient.cpp

     文件        934  2015-04-14 12:24  CH18MyselfQQclient.h

     文件       2049  2015-04-14 12:24  CH18MyselfQQclient.ui

     文件       6249  2015-04-14 12:24  CH18MyselfQQdrawer.cpp

     文件       1019  2015-04-14 12:24  CH18MyselfQQdrawer.h

     文件       1611  2015-04-14 12:24  CH18MyselfQQimagesold.png

............此处省略38个文件信息

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件举报,一经查实,本站将立刻删除。

发表评论

评论列表(条)