![]() |
2012-07-15
, 01:01
|
Posts: 8 |
Thanked: 0 times |
Joined on Jun 2012
@ Germany
|
#2
|
![]() |
2012-07-21
, 15:41
|
Posts: 3 |
Thanked: 1 time |
Joined on Mar 2010
|
#3
|
acc = QMessageAccount().defaultAccount(QMessage.Sms) m = QMessage() m.setType(QMessage.Sms) m.setFrom(QMessageAddress(QMessageAddress.Phone, num)) m.setBody(message) m.setParentAccountId(acc) m.setStatus(QMessage.Incoming, True) m.setDate(QtCore.QDateTime.currentDateTime()) store = QMessageManager() srv = QMessageService() store.addMessage(m) srv.exportUpdates(acc)
![]() |
2012-09-06
, 09:38
|
Posts: 8 |
Thanked: 0 times |
Joined on Jun 2012
@ Germany
|
#4
|
![]() |
2012-09-06
, 09:39
|
Posts: 8 |
Thanked: 0 times |
Joined on Jun 2012
@ Germany
|
#5
|
Did you ever get this working?
Im working on a project where I want to insert a QMessage and want it to show up in the Messaging application but I have yet to succed with this task.
My code looks like this (Python with pyside)
Code:acc = QMessageAccount().defaultAccount(QMessage.Sms) m = QMessage() m.setType(QMessage.Sms) m.setFrom(QMessageAddress(QMessageAddress.Phone, num)) m.setBody(message) m.setParentAccountId(acc) m.setStatus(QMessage.Incoming, True) m.setDate(QtCore.QDateTime.currentDateTime()) store = QMessageManager() srv = QMessageService() store.addMessage(m) srv.exportUpdates(acc)
![]() |
2012-09-06
, 10:00
|
|
Posts: 275 |
Thanked: 389 times |
Joined on Feb 2010
@ Sydney
|
#6
|
I generate a new message, add it to store, and it's in the SMS_draftsFoler, there is no entry in the message UI, I tried to move it to SMS_InboxFolder using QMessageService::moveMessage(), but it always failed.
I checked the parentAccount of folder and message are the same: "ring/tel/ring"
The code basically looks like this:
Last edited by nilsLee; 2012-09-06 at 09:42.