Since you're new to Qt, I'd suggest starting with a simpler solution. A QComboBox could be populated by mainwindow constructor. A simple for
loop using the QComboBox's addItem(QString)
public function call would be sufficient. That will get the base functionality you need. From there, you can start messing around with ways to get this box displaying years to float on your form and then to interact with the QLineEdit widget. The logic will involve use of the textChanged(const QString)
or textEdited(const QString)
signals.