[Top][All Lists]

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

Re: [Discuss-gnuradio] displaying a hexidecimal value with QT GUI Label

From: Marcus Müller
Subject: Re: [Discuss-gnuradio] displaying a hexidecimal value with QT GUI Label
Date: Sun, 8 May 2016 03:32:08 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0

That "formatter" needs to be a python callable that takes a single numeric argument. In your case something like:


(hex is a python built-in callable that converts numbers to hex strings), or, giving you more flexibility:


(because "{:x}".format(15) returns "F", See [1]). That format allows you to do much more (fixed width, 0-filling etc).

If things get more complicated, you might just need to use a python lambda.

Best regards,

[1] https://docs.python.org/2/library/string.html#formatstrings

On 08.05.2016 02:53, Ryan Marlow wrote:
Hello All,
I would like to display an integer variable with the QT GUI label as a hex value. Is there a way to do that with the Formatter option? I cannot figure out the syntax of the formatter.
Ryan Marlow

Discuss-gnuradio mailing list

reply via email to

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