discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Discuss-gnuradio] question about using qtgui_sink_c from c++


From: Tom Rondeau
Subject: Re: [Discuss-gnuradio] question about using qtgui_sink_c from c++
Date: Sat, 19 May 2012 16:00:59 -0400

On Sat, May 19, 2012 at 3:00 PM, Nick Foster <address@hidden> wrote:
> On Sat, May 19, 2012 at 11:09 AM, Steve <address@hidden> wrote:
>>
>> On 05/19/2012 11:06 AM, Tom Rondeau wrote:
>>
>> > Alright, but that sounds like it's in the right direction. You
>> > probably need to get a reference to the qApp and then execute that.
>> > Take a look at some of the Python examples and how they work with the
>> > qApp and then run the "exec_()" method with it. That gets the Qt
>> > engine running.
>> >
>> >
>>
>> Calling the block function exec_() (which calls exec() for the
>> QApplication) was what was needed. And setting the widget to be visible.
>> That makes a window pop up with the spectrum. But for some reason the
>> performance is very bad.
>
>
> I'm working on Qt performance in a separate branch. For now, though, if by
> "performance is very bad" you mean "update rate is slow", then change the
> line in qtgui_sink_c which says:
> set_update_time(0.5);
>
> to:
> set_update_time(0.05);
>
> This will use a 20fps update rate instead of the default (strangely) 2fps.
>
> --n

I was going to suggest the same thing. To explain the "strange" 2 fps,
that was a request to help qtgui work better on the E100. It's
perfectly fast enough for actually seeing stuff happening, but some
people think that it feels strange. It started off at 10 fps. What's
really strange is why I never exposed this setting as a public
accessor...

>> A couple of other things.  exec() does not return till the QApplication
>> exits. And it must be called from the main thread. At least that is the
>> error output I got when I tried to call it from a boost thread. To use
>> it I would have to redesign my application. So I probably won't be
>> spending any more time with it.
>>
>> stephen

Have you read up on Qt and how to handle the QApplication? They might
have some hints for you on how to handle your situation.

Tom



reply via email to

[Prev in Thread] Current Thread [Next in Thread]