Maybe something like:
Qt Code:
for ( int i = 0; i < pagecounter; i++ ) { // initialize btnTest[i] }To copy to clipboard, switch view to plain text mode
You should have learned that in the first couple of weeks of your C++ class...
Maybe something like:
Qt Code:
for ( int i = 0; i < pagecounter; i++ ) { // initialize btnTest[i] }To copy to clipboard, switch view to plain text mode
You should have learned that in the first couple of weeks of your C++ class...
<=== The Great Pumpkin says ===>
Please use CODE tags when posting source code so it is more readable. Click "Go Advanced" and then the "#" icon to insert the tags. Paste your code between them.
What I really want to do is disable the btnTest buttons when they are clicked a couple of times. But after invoking
a second time, and then clicking on the old btnTest button of the first time, they do not get disabled. Any ideas of how to do this?Qt Code:
void MyWidget::onaddbutton_clicked() {To copy to clipboard, switch view to plain text mode
The disabling methods are placed here:
Qt Code:
{ ... if(...){ btnTest[j].setEnabled(false);To copy to clipboard, switch view to plain text mode
According to the btnTest2[i].isEnabled() function the button is disabled, but in the program the btnTest2[i] remains clickable.
You onaddbutton_clicked() creates a new array of buttons every time, maybe you disabled only one of these sets.
Cheers,
_
Bookmarks