473,560 Members | 2,851 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

using QFtp class in PyQT

Kim
Hi everybody,
I tried to write simple FTP program using PyQt version 3.11. The
document say that QFtp has been implemented, but i keep getting error
message from my simple program :

My Program:

from qt import *
from qtnetwork import *

def gotSignalStart( *arg):
print "start ",arg

def gotSignalState( *arg):
print "state ",arg

def gotListInfo(*ar g):
print "List info ",arg

def doFTP():
fh = QFtp()
QObject.connect (fh,SIGNAL("sta rt()"),gotSigna lStart);
QObject.connect (fh,SIGNAL("sta teChanged()"),g otSignalState);
QObject.connect (fh,SIGNAL("lis tInfo()"),gotLi stInfo);
fh.connectToHos t("ftp.trolltec h.com")
fh.login()
print fh.state()
if fh.state() != QFtp.Unconnecte d : fh.close()

doFTP();

Error messages:

QObject::connec t: No such signal QFtp::start()
QObject::connec t: (sender name: 'unnamed')
QObject::connec t: (receiver name: 'unnamed')
QObject::connec t: No such signal QFtp::stateChan ged()
QObject::connec t: (sender name: 'unnamed')
QObject::connec t: (receiver name: 'unnamed')
QObject::connec t: No such signal QFtp::listInfo( )
QObject::connec t: (sender name: 'unnamed')
QObject::connec t: (receiver name: 'unnamed')
0
QSocket::writeB lock: Socket is not open
Can anyone help?
Thanks very much
Kim
Jul 18 '05 #1
1 2385
On Monday 19 April 2004 2:59 pm, Kim wrote:
Hi everybody,
I tried to write simple FTP program using PyQt version 3.11. The
document say that QFtp has been implemented, but i keep getting error
message from my simple program :

My Program:

from qt import *
from qtnetwork import *

def gotSignalStart( *arg):
print "start ",arg

def gotSignalState( *arg):
print "state ",arg

def gotListInfo(*ar g):
print "List info ",arg

def doFTP():
fh = QFtp()
QObject.connect (fh,SIGNAL("sta rt()"),gotSigna lStart);
QObject.connect (fh,SIGNAL("sta teChanged()"),g otSignalState);
QObject.connect (fh,SIGNAL("lis tInfo()"),gotLi stInfo);
fh.connectToHos t("ftp.trolltec h.com")
fh.login()
print fh.state()
if fh.state() != QFtp.Unconnecte d : fh.close()

doFTP();

Error messages:

QObject::connec t: No such signal QFtp::start()
QObject::connec t: (sender name: 'unnamed')
QObject::connec t: (receiver name: 'unnamed')
QObject::connec t: No such signal QFtp::stateChan ged()
QObject::connec t: (sender name: 'unnamed')
QObject::connec t: (receiver name: 'unnamed')
QObject::connec t: No such signal QFtp::listInfo( )
QObject::connec t: (sender name: 'unnamed')
QObject::connec t: (receiver name: 'unnamed')
0
You must give the full (C++) signature of the signal, eg...

SIGNAL("listInf o(const QUrlInfo &)")
QSocket::writeB lock: Socket is not open


QFtp is asynchronous. You need an event loop to make sure things actually
happen.

Phil

Jul 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
2841
by: Ilya Knizhnik | last post by:
Dear All, I am fairly new to Python. I have found it an easy language to learn and a very usefull one for many tasks. Currently I am working on a python project that involves a GUI and it was suggested that PyQt is the best way to design that GUI. However since PyQt is rather new, I have not found much documentation on it, or examples in...
35
7729
by: Vamsi Mudrageda | last post by:
I am kind of new to Python, and after trying and using wxPython, I found it kind of lacking in easy-to-read documentation, speed at loading, and GUI response-time. So I am looking for an another GUI toolkit that is cross-platform for Python, and am leaning toward PyQt (PyGTK is kind of dull looking in comparison). Unfortunately, although...
8
4840
by: simo | last post by:
OK, so I'm at the stage where I want to make a choice between wxPython and PyQt. Currently I'm using wxPython mainly due to the fact that it has GPL Linux and Windows versions. I prefer Qt to wxWindows, but am confused with all the Windows licensing issues. For the moment this is just for my own tinkering and utility apps, but
3
2062
by: Fabio | last post by:
Hi all, I'm about to write an application, and I'd like to use PyQt, but before choosing this toolkit I would like to clarify some particular licensing issues; if some user has already touched these, I would like to hear from his experiences. This app should be cross-platform, so, given qt licensing policies, I would buy a commercial PyQt...
3
2268
by: Kenneth McDonald | last post by:
If this is not an appropriate newsgroup for this type of posting, please let me know and (if possible) suggest an alternative. I've done a fair bit of research on the net, but information is scattered all over the place and I haven't been able to find mailing lists relating specifically to python and UIs. I'd like to start using Python for...
3
2062
by: Phil Thompson | last post by:
Riverbank Computing is pleased to announce the release of PyQt v4.0beta1 available from http://www.riverbankcomputing.co.uk/pyqt/. PyQt is a comprehensive set of Qt bindings for the Python programming language and supports the same platforms as Qt (Windows, Linux and MacOS/X). Like Qt, PyQt is available under the GPL and a commercial...
1
6065
by: Peter TB Brett | last post by:
Hi folks, Although the PyQt documentation indicates that QGLWidget & friends have been ported to Python for the PyQt bindings, I'm not entirely sure what's necessary to make the normal OpenGL/GLUT interface available. Does PyQt work okay with PyOpenGL? Or is a more complicated workaround needed? If anyone has experience with working...
9
12272
by: anders | last post by:
I am writing a plugin for a piece of software in python, and I want to start up a PyQt GUI in the plugin, without stalling the main thread while the gui is running (later i will want to pass messages between the main thread and the gui thread). I'm new to pyqt, so I'm probably doing something very silly, but for the moment I'm just trying...
3
3061
by: Marcpp | last post by:
Hi, I'm introducing to program in python + pyqt. I have a main window that call a second window (to introduce a info with textedit) when press the second window button I need to return to the main window the info introduced in the second window. I've seek in the pyqt doc examples but i don't find it. Have you any example?
0
7551
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7840
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7916
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
5175
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3605
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3584
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2046
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1168
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
874
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.