<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
result is screenshot in its location and my ui is not blocked.<br>
something wrong with your call.<br>
<br>
<div class="moz-cite-prefix">On 12.02.2014 21:17, itviewer wrote:<br>
</div>
<blockquote cite="mid:2014021223172926053015@jolladev.net"
type="cite">
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
<style>
BLOCKQUOTE {
MARGIN-BOTTOM: 0px; MARGIN-LEFT: 2em; MARGIN-TOP: 0px
}
OL {
MARGIN-BOTTOM: 0px; MARGIN-TOP: 0px
}
UL {
MARGIN-BOTTOM: 0px; MARGIN-TOP: 0px
}
DIV.FoxDiv20140212231154607890 {
FONT-SIZE: 10.5pt; FONT-FAMILY: 微 COLOR: #000000; LINE-HEIGHT: 1.5; 36719: ; 38597: ; 40657:
}
BODY {
FONT-SIZE: 10.5pt; FONT-FAMILY: 微软雅黑; COLOR: #000000; LINE-HEIGHT: 1.5
}
</style>
<meta name="GENERATOR" content="MSHTML 11.00.9600.16384">
<div>thanks,I tried the code but it still block the UI .</div>
<div>Do you test it and what is the result ? </div>
<div> </div>
<hr style="HEIGHT: 1px; WIDTH: 210px" size="1" align="left"
color="#b5c4df">
<div><span>
<div style="FONT-SIZE: 10pt; FONT-FAMILY: verdana; MARGIN:
10px">
<div>ma xinjun</div>
</div>
</span></div>
<div> </div>
<div style="BORDER-TOP: #b5c4df 1pt solid; BORDER-RIGHT: medium
none; BORDER-BOTTOM: medium none; PADDING-BOTTOM: 0cm;
PADDING-TOP: 3pt; PADDING-LEFT: 0cm; BORDER-LEFT: medium none;
PADDING-RIGHT: 0cm">
<div style="FONT-SIZE: 12px; FONT-FAMILY: tahoma; BACKGROUND:
#efefef; COLOR: #000000; PADDING-BOTTOM: 8px; PADDING-TOP:
8px; PADDING-LEFT: 8px; PADDING-RIGHT: 8px">
<div><b>From:</b> <a moz-do-not-send="true"
href="mailto:coderusinbox@gmail.com">Andrey Kozhevnikov</a></div>
<div><b>Date:</b> 2014-02-12 22:33</div>
<div><b>To:</b> <a moz-do-not-send="true"
href="mailto:devel@lists.sailfishos.org">devel</a></div>
<div><b>Subject:</b> Re: [SailfishDevel] How to get the screen
capture but don't block UI</div>
</div>
</div>
<div>
<div class="FoxDiv20140212231154607890" style="BACKGROUND-COLOR:
white"><tt>QDBusInterface *iface = new
QDBusInterface("org.nemomobile.lipstick,</tt><tt><br>
</tt><tt>
"/org/nemomobile/lipstick/screenshot",</tt><tt><br>
</tt><tt>
"org.nemomobile.lipstick",</tt><tt><br>
</tt><tt>
QDBusConnection::sessionBus(),</tt><tt><br>
</tt><tt> this);</tt><tt><br>
</tt><tt>iface->call(QDBus::NoBlock, "saveScreenshot", "</tt><tt>/home/nemo/Pictures/123.png");</tt><br>
<br>
<div class="moz-cite-prefix">On 12.02.2014 20:26, itviewer
wrote:<br>
</div>
<blockquote cite="mid:201402122226367087739@jolladev.net"
type="cite">
<style>BLOCKQUOTE {
MARGIN-BOTTOM: 0px; MARGIN-LEFT: 2em; MARGIN-TOP: 0px
}
OL {
MARGIN-BOTTOM: 0px; MARGIN-TOP: 0px
}
UL {
MARGIN-BOTTOM: 0px; MARGIN-TOP: 0px
}
P {
MARGIN-BOTTOM: 0px; MARGIN-TOP: 0px
}
</style>
<meta name="GENERATOR" content="MSHTML 11.00.9600.16384">
<div>
<div> My code just like:</div>
<div> </div>
<div> QDBusMessage message =
QDBusMessage::createMethodCall("org.nemomobile.lipstick",</div>
<div style="TEXT-INDENT: 14em">"/org/nemomobile/lipstick/screenshot",</div>
<div style="TEXT-INDENT: 14em"> "org.nemomobile.lipstick",</div>
<div style="TEXT-INDENT: 14em">"saveScreenshot" );</div>
<div> QDBusConnection conn =
QDBusConnection::sessionBus();</div>
<div> conn.send(message);</div>
<div> </div>
<div> But it still block the UI ( screen will not
response within a few seconds)</div>
<div> Please help!Thanks very much.</div>
</div>
<div> </div>
<hr style="HEIGHT: 1px; WIDTH: 210px" size="1" align="left"
color="#b5c4df">
<div><span>
<div style="FONT-SIZE: 10pt; FONT-FAMILY: verdana;
MARGIN: 10px">
<div>ma xinjun</div>
</div>
</span></div>
<div> </div>
<div style="BORDER-TOP: #b5c4df 1pt solid; BORDER-RIGHT:
medium none; BORDER-BOTTOM: medium none; PADDING-BOTTOM:
0cm; PADDING-TOP: 3pt; PADDING-LEFT: 0cm; BORDER-LEFT:
medium none; PADDING-RIGHT: 0cm">
<div style="FONT-SIZE: 12px; FONT-FAMILY: tahoma;
BACKGROUND: #efefef; COLOR: #000000; PADDING-BOTTOM:
8px; PADDING-TOP: 8px; PADDING-LEFT: 8px; PADDING-RIGHT:
8px">
<div><b>From:</b> <a
href="mailto:david.greaves@jolla.com"
moz-do-not-send="true">David Greaves</a></div>
<div><b>Date:</b> 2014-02-12 17:23</div>
<div><b>To:</b> <a
href="mailto:devel@lists.sailfishos.org"
moz-do-not-send="true">Sailfish OS Developers</a></div>
<div><b>Subject:</b> Re: [SailfishDevel] How to get the
screen capture but don't block UI</div>
</div>
</div>
<div>
<div>Correct</div>
<div> </div>
<div>David</div>
<div> </div>
<div>On 12/02/14 06:46, Andrey Kozhevnikov wrote:</div>
<div>> using Qt DBus classes and not use system() call?</div>
<div>> </div>
<div>> On 12.02.2014 12:08, itviewer wrote:</div>
<div>>> Dear all,</div>
<div>>> </div>
<div>>> I need the screen capture function in my
application . There are two</div>
<div>>> applications (screenshot and opensource
sailshotme) in the jolla store.</div>
<div>>> </div>
<div>>> From the "sailshotme", I know that can call
the saveScreenshot method of</div>
<div>>> org.nemomobile.lipstick through dbus, such
as the command:</div>
<div>>> </div>
<div>>> "dbus-send --session --type=method_call
--print-reply</div>
<div>>> --dest=org.nemomobile.lipstick
/org/nemomobile/lipstick/screenshot</div>
<div>>> org.nemomobile.lipstick.saveScreenshot
string:/home/nemo/Pictures/123.png "</div>
<div>>> </div>
<div>>> but, using the "sailshotme" or the above
mentioned command will lead to the UI</div>
<div>>> blocking of sailfish system, the screen will
not response within</div>
<div>>> a few seconds, however, it seems that there
is no such blocking when using the</div>
<div>>> "screenshot".</div>
<div>>> so I want to know the mechanism of the
"screenshot"?</div>
<div>>> </div>
<div>>> Best&Regards</div>
<div>>> </div>
<div>>>
--------------------------------------------------------------------------------</div>
<div>>> ma xinjun</div>
<div>>></div>
<div>>></div>
<div>>>
_______________________________________________</div>
<div>>> SailfishOS.org Devel mailing list</div>
<div>> </div>
<div>> </div>
<div>> </div>
<div>> _______________________________________________</div>
<div>> SailfishOS.org Devel mailing list</div>
<div>> </div>
<div> </div>
<div>_______________________________________________</div>
<div>SailfishOS.org Devel mailing list</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
SailfishOS.org Devel mailing list</pre>
</blockquote>
<br>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
SailfishOS.org Devel mailing list</pre>
</blockquote>
<br>
</body>
</html>