I would advise against adding 1,000 - 2,000 QPushbutton's to a QWidget-derived object. Is there a reason why you need to use that many buttons?