Open the default Messaging Composer Application: Difference between revisions

From Qt Wiki
Jump to navigation Jump to search
No edit summary
 
No edit summary
Line 1: Line 1:
=Open the default Messaging Composer Application=
[[Category:HowTo]]<br />[[Category:snippets]]


==Overiew==
[toc align_right=&quot;yes&amp;quot; depth=&quot;2&amp;quot;]


The following code snippet shows how to open the default messaging composer application of the platform (Symbian, MeeGo Harmattan, Maemo, etc.) using method [http://doc.trolltech.com/qtmobility-1.2/qmessageservice.html#compose compose] ''[doc.trolltech.com]'' of class [http://doc.trolltech.com/qtmobility-1.2/qmessageservice.html QMessageService] ''[doc.trolltech.com]'' of Qt Mobility. The example loads <span class="caps">SMS</span> that is waiting to be edited and sent by the user.
= Open the default Messaging Composer Application =


==Code Snippet==
== Overiew ==


Include the required headers:<br />
The following code snippet shows how to open the default messaging composer application of the platform (Symbian, MeeGo Harmattan, Maemo, etc.) using method &quot;compose&amp;quot;:http://doc.trolltech.com/qtmobility-1.2/qmessageservice.html#compose of class &quot;QMessageService&amp;quot;:http://doc.trolltech.com/qtmobility-1.2/qmessageservice.html of Qt Mobility. The example loads SMS that is waiting to be edited and sent by the user.


Enable messaging at pro file:<br />
== Code Snippet ==


Implementation:<br />
Include the required headers:<br /><code><br />#include &lt;QMessageService&amp;gt;<br />#include &lt;QMessage&amp;gt;<br /></code>


===Categories:===
Enable messaging at pro file:<br /><code><br />CONFIG ''= mobility<br />MOBILITY''= messaging<br /></code>


* [[:Category:HowTo|HowTo]]
Implementation:<br /><code><br />QMessageService pMessageManager = new QMessageService(this);<br />QMessage message;<br />message.setType(QMessage::Sms);<br />message.setBody(&quot;Foo&amp;quot;);<br />m_pMessageManager-&gt;compose(message);
* [[:Category:snippets|snippets]]

Revision as of 11:34, 24 February 2015


[toc align_right="yes&quot; depth="2&quot;]

Open the default Messaging Composer Application

Overiew

The following code snippet shows how to open the default messaging composer application of the platform (Symbian, MeeGo Harmattan, Maemo, etc.) using method "compose&quot;:http://doc.trolltech.com/qtmobility-1.2/qmessageservice.html#compose of class "QMessageService&quot;:http://doc.trolltech.com/qtmobility-1.2/qmessageservice.html of Qt Mobility. The example loads SMS that is waiting to be edited and sent by the user.

Code Snippet

Include the required headers:

<br />#include &lt;QMessageService&amp;gt;<br />#include &lt;QMessage&amp;gt;<br />

Enable messaging at pro file:

<br />CONFIG ''= mobility<br />MOBILITY''= messaging<br />

Implementation:

QMessageService pMessageManager = new QMessageService(this);
QMessage message;
message.setType(QMessage::Sms);
message.setBody("Foo&quot;);
m_pMessageManager->compose(message);