Код: Выделить всё
#include
#include
#include
int main(int argc, char *argv[]) {
QApplication app(argc, argv);
QWidget w;
QVBoxLayout *lay = new QVBoxLayout(&w);
QComboBox combobox;
combobox.setFocusPolicy(Qt::NoFocus);
for (int i = 0; i < 10; ++i) {
combobox.addItem(QString("Item %1").arg(i));
}
lay->addWidget(&combobox);
w.show();
return app.exec();
}
Подробнее здесь: https://stackoverflow.com/questions/787 ... qt-6-4-2-c
Мобильная версия