VireX
15th February 2007, 03:59
Well I want to loop through Qt::Key_0 to Qt::Key_9
Like adding a bunch of numbers in buttons:
for(int i = 0; i < 10; i++){
QPushButton* Nums[i] = new QPushButton(tr(i));
Nums[i]->setShortcut(0x30); // but i can't loop with hexes since there is no eval in C++
Nums[i]->setFixedWidth(25);
}
Any Ideas?
Like adding a bunch of numbers in buttons:
for(int i = 0; i < 10; i++){
QPushButton* Nums[i] = new QPushButton(tr(i));
Nums[i]->setShortcut(0x30); // but i can't loop with hexes since there is no eval in C++
Nums[i]->setFixedWidth(25);
}
Any Ideas?