listwidgetitem check box style sheet not working
Unsolved
General and Desktop
-
Custom Controls
I am working on putting a user control using listwidgetitem. I tried setStylesheet to increase the size of the checkbox, but it does not work properly, so I ask a question.
void WToggleMenu::InitListitem() { for (int n = 0; n < 20; n++) { usrCntrListItem* pListItem = new usrCntrListItem(QString("%1").arg(n)); QListWidgetItem* pWidgetItem = new QListWidgetItem(this->ui.listWidget); pWidgetItem->setSizeHint(pListItem->sizeHint()); this->ui.listWidget->addItem(pWidgetItem); this->ui.listWidget->setItemWidget(pWidgetItem, pListItem); } } usrCntrListItem::usrCntrListItem(QString strTitle) { ui.setupUi(this); this->ui.text_Title->setText(strTitle); this->ui.chk_Enable->setStyleSheet("\ QCheckBox::indicator\ {\ width: 50px;\ height: 50px;\ }"); }
I tried this and executed it, and although the size of the indicator in the view was the same, I was able to confirm that the area was changed when I actually clicked it.
Please suggest a way to change the stylesheet of the indicator