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(*arg):
print "List info ",arg
def doFTP():
fh = QFtp()
QObject.connect(fh,SIGNAL("start()"),gotSignalStar t);
QObject.connect(fh,SIGNAL("stateChanged()"),gotSig nalState);
QObject.connect(fh,SIGNAL("listInfo()"),gotListInf o);
fh.connectToHost("ftp.trolltech.com")
fh.login()
print fh.state()
if fh.state() != QFtp.Unconnected : fh.close()
doFTP();
Error messages:
QObject::connect: No such signal QFtp::start()
QObject::connect: (sender name: 'unnamed')
QObject::connect: (receiver name: 'unnamed')
QObject::connect: No such signal QFtp::stateChanged()
QObject::connect: (sender name: 'unnamed')
QObject::connect: (receiver name: 'unnamed')
QObject::connect: No such signal QFtp::listInfo()
QObject::connect: (sender name: 'unnamed')
QObject::connect: (receiver name: 'unnamed')
0
QSocket::writeBlock: Socket is not open
Can anyone help?
Thanks very much
Kim 1 2381
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(*arg): print "List info ",arg
def doFTP(): fh = QFtp() QObject.connect(fh,SIGNAL("start()"),gotSignalStar t); QObject.connect(fh,SIGNAL("stateChanged()"),gotSig nalState); QObject.connect(fh,SIGNAL("listInfo()"),gotListInf o); fh.connectToHost("ftp.trolltech.com") fh.login() print fh.state() if fh.state() != QFtp.Unconnected : fh.close()
doFTP();
Error messages:
QObject::connect: No such signal QFtp::start() QObject::connect: (sender name: 'unnamed') QObject::connect: (receiver name: 'unnamed') QObject::connect: No such signal QFtp::stateChanged() QObject::connect: (sender name: 'unnamed') QObject::connect: (receiver name: 'unnamed') QObject::connect: No such signal QFtp::listInfo() QObject::connect: (sender name: 'unnamed') QObject::connect: (receiver name: 'unnamed') 0
You must give the full (C++) signature of the signal, eg...
SIGNAL("listInfo(const QUrlInfo &)")
QSocket::writeBlock: Socket is not open
QFtp is asynchronous. You need an event loop to make sure things actually
happen.
Phil This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
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...
|
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...
|
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...
|
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...
|
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...
| |
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...
|
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...
|
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...
|
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...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
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...
| |
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,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
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...
|
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...
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
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...
| |