On Wed, Oct 9, 2013 at 1:30 PM, Victor Palau <victor.pa...@canonical.com> wrote:
> Hi,
>
> I was playing with building a C++ component that have a slot.  Have a UI in
> QML that has a button. The button I have connected the button onclicked
> signal with the C++ component slot, so when I clicked the button, the C++
> object does its magic. This all works, but the UI freezes as soon as I do
> this.
>
> I thought that signals and slots were async so that shouldnt happen. Any
> thoughts?

What is the C++ code doing?

If the C++ code is cpu-intensive, then the UI will get blocked, and
you'll need to run it in a thread.
Here's how to show a busy indicator while the thread runs, and how to
hide it when it's done:
http://stackoverflow.com/questions/12071021/qml-and-qthread-multithreading

cheers,
-- 
alecu

-- 
Mailing list: https://launchpad.net/~ubuntu-phone
Post to     : ubuntu-phone@lists.launchpad.net
Unsubscribe : https://launchpad.net/~ubuntu-phone
More help   : https://help.launchpad.net/ListHelp

Reply via email to