Haven't used Qt for some time, but have used several other packages,
and they're all basically the same.
First, check Qt documentation to see if they have a load from file method already built in.
If not, You need to load the combo box manually, which isn't very difficult.
Opening and reading the file would be the same as for any other purpose.
when you isolate the data that you want to populate the combo box with, you will need to find a Qt command
to insert text into the combo box, and do that line by line as you read the data from the file.
See: http://doc.qt.io/qt-5/qcombobox.html find index and insert
You will then also have to bind clicks from the combobox to an event method.
In wxpython and tkinter, this is literally a bind instruction, and probably on Qt as well.
In the routine that you bind to, you will need to extract the index of the item in the combo box,
then get the item at that index, and use it to reference back to your main data source.
Since I don't know the specific commands in Qt, you will have to look them up.
The insert statement should be a method attached to the ComboBox widget, and found in the
documentation for that.
Bind is a bit more general, and probably has it's own documentation.
The syntax is usually the same for buttons, combobox, and many other widgets,
and will have the form of widget.bind(<event type>, methodToexecute)
see: http://doc.qt.io/archives/qt-4.8/eventsandfilters.html
You should be able to use this as a guide to help find associated docs.
and they're all basically the same.
First, check Qt documentation to see if they have a load from file method already built in.
If not, You need to load the combo box manually, which isn't very difficult.
Opening and reading the file would be the same as for any other purpose.
when you isolate the data that you want to populate the combo box with, you will need to find a Qt command
to insert text into the combo box, and do that line by line as you read the data from the file.
See: http://doc.qt.io/qt-5/qcombobox.html find index and insert
You will then also have to bind clicks from the combobox to an event method.
In wxpython and tkinter, this is literally a bind instruction, and probably on Qt as well.
In the routine that you bind to, you will need to extract the index of the item in the combo box,
then get the item at that index, and use it to reference back to your main data source.
Since I don't know the specific commands in Qt, you will have to look them up.
The insert statement should be a method attached to the ComboBox widget, and found in the
documentation for that.
Bind is a bit more general, and probably has it's own documentation.
The syntax is usually the same for buttons, combobox, and many other widgets,
and will have the form of widget.bind(<event type>, methodToexecute)
see: http://doc.qt.io/archives/qt-4.8/eventsandfilters.html
You should be able to use this as a guide to help find associated docs.