|
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 (hex is a python built-in callable that converts numbers to hex strings), or, giving you more flexibility: "0x{:X}".format (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, Marcus [1] https://docs.python.org/2/library/string.html#formatstrings On 08.05.2016 02:53, Ryan Marlow wrote:
|
[Prev in Thread] | Current Thread | [Next in Thread] |