This project was written when I went to college (although I haven't graduated yet). From a professional perspective, the architecture of this chat software is relatively poor. But a year ago, this was indeed my highest level.
I really admire myself at the time. I don't need to say that the level is poor, but I can spend a lot of time to complete a project that is almost impossible. It took a few months to finally come up with a result, at least it can run normally. When I went to my internship, this project also helped me get a lot of interview opportunities (of course they were all interview opportunities for small companies ). Haha.
Now, I am posting on my blog to commemorate my school days.
First
Windows 7:
Ubuntu 10.04
Then, go to the software
Windows 7, 32-bit. You are welcome to use it (you can run it without installing QT)
Http://download.csdn.net/source/3198457
Finally, go to the code
Http://download.csdn.net/source/3198961
Finally, I spoke nonsense.
I. After learning QT for a while, I wrote a small project (I also said it was "masterpiece") to practice it.
This project took me almost two months. In fact, it does not take so long, but I am not good enough, and I can be stuck for several days even with some minor problems. What's worse, I used this project as an excuse for being too difficult to play games. So, two months have passed. Fortunately, this program will eventually run.
II. I had a lot of detours while working on this project, but I also learned a lot. After all, designing a 10 thousand-line software is far from writing a one hundred-line program (a little bit of water, because it can shorten a lot of code after optimization refactoring ). During this period, I learned the design pattern and wanted to use it on this project... Later I read Objective C ++ and found that my design is really bad...
Alas, refactoring, refactoring .........
I have considered this project a versatile lab material.
Iii. I posted many posts on csdn and received help from many friends. Thank you here.
Now I open-source the software, so that everyone can learn and make progress together.
You are welcome to discuss this (software bug, code readability, architecture, optimization suggestions, etc.).
If you find a bug or have any suggestions, please reply, you can also send an email to: aa1080711@163.com
4. Note:
1. This software is implemented using C ++ (QT.
2. the working principle of this software is to establish a persistent connection between the client and the server and then communicate with each other. When different clients need to communicate with each other, all the information will be transferred through the server.
3. When running the software, first run the server on a host, obtain the IP address and port of the host, and then run the client. After the connection, register and log on to the host (see help before registration ).
4. It is best for the server to run on a host on the public network (non-LAN) (the LAN can also run, as long as all clients can be connected ), if the server and client are on the same host, the IP address is "127.0.0.1"
5. The code is cross-platform, but the code is compiled on vs2008. Therefore, a bunch of warnings will appear when you use QT creator to compile the client (no warning is reported on vs2008 ). The "inputtextedit. h file cannot be found" error may also occur (change it to "inputtextedit. H"). The Code automatically generated by the compiler will be wrong, which is amazing.
6. If you compile your own code, make sure that the client and pictures are in the same folder.
7. the Avatar in the software is copied to QQ directly.
Let's talk about it. After all, it took me a lot of effort to do this project.
PS: I am also the first time doing so comprehensive software, not doing well, please forgive me a lot.