View Single Post
nicolai's Avatar
Posts: 1,637 | Thanked: 4,424 times | Joined on Apr 2009 @ Germany
#1
Anyone got the qml plugin MessageModel working?
For it does not work on the device (N950).
Here is a simple stripped down example.
In QtCreator:
Create Project ...
Qt Quick Application
Qt Quick Components for MeeGo/Harmattan

put this in your MainPage.qml
import QtQuick 1.1
import com.nokia.meego 1.0
import QtMobility.messaging 1.1

Page {
tools: commonTools
MessageModel {
id:messagemodel
}

ListView {
id:list
anchors.fill:parent
model:messagemodel
delegate: Item {
id: wrapper
height: 32; width: list.width
Text { id: subjText; text: subject; font.pixelSize: 13; x: 3 }
}
}
}

and add this to your .pro file
CONFIG += mobility
MOBILITY += messaging

Running the application on the simulator target works(!)
On the device I got this messages:
...
Messaging : Looking for account by id: 5
Messaging : Looking for account by id: 3
Aborted

and /var/log/syslog shows:

GLIB ERROR ** GThread - file /home/bifh7/cs2009q3-armel/work/glib2.0-2.28.4/./gthread/gthread-posix.c: line 362 (g_thread_create_posix_impl): error 'Invalid argument' during 'pthread_attr_setschedpolicy (&attr, policy)' aborting...
 

The Following User Says Thank You to nicolai For This Useful Post: