<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=utf-8" http-equiv=Content-Type>
<STYLE>
BLOCKQUOTE {
        MARGIN-BOTTOM: 0px; MARGIN-LEFT: 2em; MARGIN-TOP: 0px
}
OL {
        MARGIN-BOTTOM: 0px; MARGIN-TOP: 0px
}
UL {
        MARGIN-BOTTOM: 0px; MARGIN-TOP: 0px
}
P {
        MARGIN-BOTTOM: 0px; MARGIN-TOP: 0px
}
BODY {
        FONT-SIZE: 10.5pt; FONT-FAMILY: 微软雅黑; COLOR: #000000; LINE-HEIGHT: 1.5
}
</STYLE>

<META name=GENERATOR content="MSHTML 10.00.9200.16736"></HEAD>
<BODY style="MARGIN: 10px">
<DIV>Thanks for all the suggestions.</DIV>
<DIV>I will try your advices.</DIV>
<DIV> </DIV>
<HR style="HEIGHT: 1px; WIDTH: 210px" align=left color=#b5c4df SIZE=1>

<DIV><SPAN>
<DIV 
style="FONT-SIZE: 10.5pt; FONT-FAMILY: 微软雅黑; COLOR: #000000; LINE-HEIGHT: 1.5">
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: verdana; MARGIN: 10px">
<DIV>杨有秀</DIV>
<DIV style="TEXT-INDENT: 2em">敬上</DIV></DIV></DIV></SPAN></DIV>
<DIV> </DIV>
<DIV 
style="BORDER-TOP: #b5c4df 1pt solid; BORDER-RIGHT: medium none; BORDER-BOTTOM: medium none; PADDING-BOTTOM: 0cm; PADDING-TOP: 3pt; PADDING-LEFT: 0cm; BORDER-LEFT: medium none; PADDING-RIGHT: 0cm">
<DIV 
style="FONT-SIZE: 12px; FONT-FAMILY: tahoma; BACKGROUND: #efefef; COLOR: #000000; PADDING-BOTTOM: 8px; PADDING-TOP: 8px; PADDING-LEFT: 8px; PADDING-RIGHT: 8px">
<DIV><B>From:</B> <A href="mailto:sank.daniel@gmail.com">Daniel 
Sank</A></DIV>
<DIV><B>Date:</B> 2013-11-18 01:01</DIV>
<DIV><B>To:</B> <A href="mailto:twisted-python@twistedmatrix.com">Twisted 
general discussion</A></DIV>
<DIV><B>Subject:</B> Re: [Twisted-Python] how to change an qt4 applicaion 
using twisted?</DIV></DIV></DIV>
<DIV>
<DIV>Yangyouxiu,</DIV>
<DIV> </DIV>
<DIV>I can definitely help you with this as I've recently written a chat</DIV>
<DIV>server/client with twisted+PyQt4 and am working on a more complex</DIV>
<DIV>program that uses PyQt4 with twisted's perspective broker.</DIV>
<DIV> </DIV>
<DIV>I have attached five files:</DIV>
<DIV> </DIV>
<DIV>1. client-pyqtreactor.py is a chat client using pyqtreactor and 
PyQt4.</DIV>
<DIV>2. ui.ui is the user interface file loaded by client-pyqtreactor.py</DIV>
<DIV>3. server.py is a chat server using asyncore. Note that the server</DIV>
<DIV>need not use PyQt4 as it has no GUI.</DIV>
<DIV>4. constants.py contains configuration data for the client and server</DIV>
<DIV>5. qt4reactor.py is the custom reactor</DIV>
<DIV> </DIV>
<DIV>Put these all in the same directory, then run the server, then run</DIV>
<DIV>some clients. When the client window appears click "connect" and then</DIV>
<DIV>you can use it just like any other network chat program.</DIV>
<DIV> </DIV>
<DIV>I hope this helps, and if anyone has suggestions on how to improve 
the</DIV>
<DIV>client code please tell me, as I intend on using it as part of a</DIV>
<DIV>tutorial on twsited+PyQt4.</DIV>
<DIV> </DIV>
<DIV>Danie Sank</DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV>_______________________________________________</DIV>
<DIV>Twisted-Python mailing list</DIV>
<DIV>Twisted-Python@twistedmatrix.com</DIV>
<DIV>http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python</DIV>
<DIV> </DIV></DIV></BODY></HTML>