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.
void SettingsWindow::drawCombobox()
{
endDeviceCombobox
= new QComboBox(ui.
groupBox_2);
endDeviceCombobox
->setGeometry
(QRect(190,
20,
111,
21));
endDeviceCombobox->setEditable(false);
endDeviceCombobox->setDuplicatesEnabled(false);
}
void SettingsWindow::drawCombobox()
{
QSettings settings;
endDeviceCombobox = new QComboBox(ui.groupBox_2);
endDeviceCombobox->setGeometry(QRect(190, 20, 111, 21));
endDeviceCombobox->setEditable(false);
endDeviceCombobox->setDuplicatesEnabled(false);
}
To copy to clipboard, switch view to plain text mode
i tried but the combobox doesnt appear in the dialog. why so?
Bookmarks