On 03/11/2015 11:16 AM, Tom Rondeau wrote:
On Tue, Mar 10, 2015 at 8:26 PM, Marcus D. Leech <mle...@ripnet.com
<mailto:mle...@ripnet.com>> wrote:
Does the formatter callback work? I can't get it to do anything
useful, using a lambda expression stuffed into a variable. How
does the widget calll the desired function?
Hmm, just tried this and it worked:
lambda x: "Value = {0} (put units here)".format(perform_function_on(x))
So the expression returns a string.
Tom
I actually took a different approach last night that works.
I set the type of the label to string, and have an external variable
that does the formatting I need, returning a string, and it is that
string that is used in the Qt label. No formatter callback required.
_______________________________________________
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio