hey there i am making a grid layout and i have 2 QLineEdit displayboxs with 1 under the other. is there a way to make the display boxes smaller in width:

Qt Code:
  1. display = new QLineEdit("0");
  2. display->setReadOnly(true);
  3. display->setAlignment(Qt::AlignCenter);
  4. display->setMaxLength(10);
  5. display->installEventFilter(this);
  6. QFont font = display->font();
  7. font.setPointSize(font.pointSize() + 8);
  8. display->setFont(font);
  9.  
  10. display2 = new QLineEdit("0");
  11. display2->setReadOnly(true);
  12. display2->setAlignment(Qt::AlignCenter);
  13. display2->setMaxLength(10);
  14. display2->installEventFilter(this);
  15. QFont font2 = display2->font();
  16. font2.setPointSize(font2.pointSize() + 8);
  17. display2->setFont(font2);
To copy to clipboard, switch view to plain text mode