[PyQt] Instant Messaging through PySide & PyQtMobility on N900.

David Boddie dboddie at trolltech.com
Fri Oct 8 12:54:24 BST 2010


On Fri Oct 8 09:45:20 BST 2010, praveen koduru wrote:

> I am trying to send Instant message(IM) through N900 using PySide &
> PyQtMobility. I am getting QMessageService sending failed. The code is
> below:
>
> from QtMobility.Messaging import *
> from PySide.QtCore import *
> import sys
> from PyQt4 import QtCore
> import dbus
>
> app = QCoreApplication(sys.argv)
>
> in_msg_add = QMessageAddress(QMessageAddress.InstantMessage,
>               QtCore.QString("user_to_recieve at gmail.com"))
> msg = QMessage()
> msg.setType(QMessage.InstantMessage)
> msg.setTo(in_msg_add)
> msg.setBody(QtCore.QString("Hi Hello"))
>
> '''send message'''
> sender = QMessageService()
> if (sender.send(msg)):
>   print "success"
> else:
>   print "fail"
>
> I am getting the message sending failed error as below:
> Connecting to deprecated signal
> QDBusConnectionInterface::serviceOwnerChanged(QString,QString,QString)
> sync eventloop exit
> QMessageService::send
> send returns= false
> fail

You're using PySide's classes to attempt this, not PyQt's classes, so there's
not really anything I can do to help you diagnose the problem. One thing I
would try is to run the event loop and see if that helps.

You may also want to read my previous message, if you missed it:

  http://www.riverbankcomputing.com/pipermail/pyqt/2010-October/028058.html

David
-- 
David Boddie
Senior Technical Writer
Nokia, Qt


More information about the PyQt mailing list