QCheckBox *checkBox = new QCheckBox("Show Password");
QStringList options = {"Option 1", "Option 2", "Option 3"}; for (const QString& opt : options) { QCheckBox *checkBox = new QCheckBox(opt); }This creates multiple checkboxes with the texts "Option 1", "Option 2", and "Option 3" on them. The QCheckBox class belongs to the Qt Widgets module, which is included in the Qt Core package library.