Тёмный

Qt Drag And Drop | QLabel And QGraphicsView | Qt C++ | Qt Creator | Qt Tutorial 

Qt With Ketan
Подписаться 2,7 тыс.
Просмотров 1,9 тыс.
50% 1

Опубликовано:

 

21 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 2   
@bennguyen1313
@bennguyen1313 7 месяцев назад
I'd like to iterate through all the GUI Checkboxes via an array... for i = 0 ; i < 9; i++ ck[i].setCheckState(Checked) Is it possible to drag a Checkbox into the editor and tell it that this is ck 5 of 10? If not, and we must define the name as ck0..ck9... is there a way to programmatically access a checkbox by dynamically building the variable name ("ck"+"0").setChecked? Alternatively, creating an array that at run-time, initializes with the address of the Checkbox elements.. ui->setupUi(this); // Setup UI from the .ui file QCheckBox* ck[10]; ck[0] = findChild("ck0"); ... ck[9] = findChild("ck9"); for (auto checkBox : ck) { checkBox->setChecked(true);
@qtwithketan
@qtwithketan 7 месяцев назад
Thanks for watching my videos. Yes you can get the all checkbox recursively of entire application and set the Checkbox status and other property also. Follow The Code :: QList AllCheckBoxes = this->findChildren(); // To Get The Checkbox of of parent container. for (int i = 0; i < AllCheckBoxes.size(); i++) { qDebug() objectName(); // Get Your Object Name AllCheckBoxes.at(i)->setChecked(true); // Set Property }
Далее
Qt Crash Course for Beginners - Create C++ GUI Apps
30:34
Qt resizeable image in QGraphicsView
11:31
Просмотров 1,7 тыс.
Let's Recreate the Tesla UI in Qt and QML PART 1!
51:16
JavaFX Drag and Drop Image to ImageView Tutorial
5:04
Просмотров 1,4 тыс.