What influences the visibility of QLCDNumber digits?

1.8k Views Asked by At

I do have the following code:

  Address = new QLCDNumber(this);
  Address->setDigitCount(4);
  Address->setSegmentStyle(QLCDNumber::Flat);
  Address->display(mValue);
  mainLayout->addWidget(Address);

  Value = new QLCDNumber(this);
  Value->setDigitCount(8);
  Value->setSegmentStyle(QLCDNumber::Flat);
  Value->display(mValue);
  mainLayout->addWidget(Value);

And the result is shown below. I see the only difference in the number of digits. If I change the number of digits for the first QLCDNumber to 6, it also gets thinner. How can I make the second, 8-digit number better visible?

enter image description here

1

There are 1 best solutions below

0
On
  Value = new QLCDNumber(this);
  Value->setMinimumWidth(Value->width()+1);

solves the problem, so I guess it is a kind of rounding error in the QLCDNumber size (or segment shape?) calculating algorithm.