Formatter callback in QT QUI Label widget

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?

On Tue, Mar 10, 2015 at 8:26 PM, Marcus D. Leech [email protected]
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

On 03/11/2015 11:16 AM, Tom R. wrote:

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.