-1

As far as I see, QLCDNumber can only display signed integers. I want to display content of processor registers, which are typically unsigned. Is there any hacking to display unsigned integers?

katang
  • 2,474
  • 5
  • 24
  • 48
  • @Murphy I do not think it would change anything. Finally, only display(int num) exists, no display(unsigned int num). – katang Feb 20 '16 at 20:45
  • Read the reference of `QLCDNumber`. Try my suggestion. Then come back. Please. – Murphy Feb 20 '16 at 20:48

1 Answers1

1

QLCDNumber also accepts strings (within a limited character set). Try formatting the value as QString before passing it to QLCDNumber::display().

Murphy
  • 3,827
  • 4
  • 21
  • 35
  • QLCDNumber has methods setXXXMode(), that is what I prefer. When following your suggestion, I need to re-code manually that internal machinery, and use QLCDNumber in string-only mode. I think it is not quite in the spirit of object-orientation. Maybe the simplest solution is to subclass, with a new method. I just wanted to know, if someone else faced the problem. – katang Feb 21 '16 at 08:19