The Following User Says Thank You to nicolai For This Useful Post: | ||
![]() |
2012-08-10
, 21:33
|
|
Posts: 1,637 |
Thanked: 4,424 times |
Joined on Apr 2009
@ Germany
|
#3
|
#include <QtGui/QApplication> #include "qmlapplicationviewer.h" #include <QMessageService> QTM_USE_NAMESPACE Q_DECL_EXPORT int main(int argc, char *argv[]) { QScopedPointer<QApplication> app(createApplication(argc, argv)); QMessageService qm; QmlApplicationViewer viewer; viewer.setOrientation(QmlApplicationViewer::ScreenOrientationAuto); viewer.setMainQmlFile(QLatin1String("qml/messagemodeltest/main.qml")); viewer.showExpanded(); return app->exec(); }
The Following 2 Users Say Thank You to nicolai For This Useful Post: | ||
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...
my contributions:
Desktop Clock Widget|Calendar Home Widget|Lens Cover Reminder|ConnectNow|Scout|App Search Widget|ProfilesX|
Desktop-Switcher|SMS-Messageblocker
-Donate-