Oh sorry for the typo. I meant QToolButton there.
Thank you.
Oh sorry for the typo. I meant QToolButton there.
Thank you.
To your code from the first post: You don't pass a QPushButton by reference. You pass "a pointer to QPushButton by value". That's why btn1/2/3/4 doesn't change after calling addButtons - just a copy of that pointer changes.
The following piece of code might work.
Qt Code:
{ pb->setCheckable(true); pb->setStyleSheet(str); vLyt->addWidget(pb); }To copy to clipboard, switch view to plain text mode
Bookmarks