hi. i have a dialog created using QtDesginer. can i add a combobox in that dialog using pure c++ language? example show in the code below.

Qt Code:
  1. void SettingsWindow::drawCombobox()
  2. {
  3. QSettings settings;
  4.  
  5. endDeviceCombobox = new QComboBox(ui.groupBox_2);
  6. endDeviceCombobox->setGeometry(QRect(190, 20, 111, 21));
  7. endDeviceCombobox->setEditable(false);
  8. endDeviceCombobox->setDuplicatesEnabled(false);
  9. }
To copy to clipboard, switch view to plain text mode 

i tried but the combobox doesnt appear in the dialog. why so?