178 QTableWidgetItem * nameCell = new QTableWidgetItem(HWApplication::translate("binds", cbinds[i].name)); |
178 QTableWidgetItem * nameCell = new QTableWidgetItem(HWApplication::translate("binds", cbinds[i].name)); |
179 nameCell->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled); |
179 nameCell->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled); |
180 curTable->insertRow(row); |
180 curTable->insertRow(row); |
181 curTable->setItem(row, 0, nameCell); |
181 curTable->setItem(row, 0, nameCell); |
182 QTableWidgetItem * bindCell = new QTableWidgetItem(comboBox->currentText()); |
182 QTableWidgetItem * bindCell = new QTableWidgetItem(comboBox->currentText()); |
|
183 QIcon dropDownIcon = QIcon(); |
|
184 QPixmap dd1 = QPixmap(":/res/dropdown.png"); |
|
185 QPixmap dd2 = QPixmap(":/res/dropdown_selected.png"); |
|
186 dropDownIcon.addPixmap(dd1, QIcon::Normal); |
|
187 dropDownIcon.addPixmap(dd2, QIcon::Selected); |
|
188 bindCell->setIcon(dropDownIcon); |
183 bindCell->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled); |
189 bindCell->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled); |
184 curTable->setItem(row, 1, bindCell); |
190 curTable->setItem(row, 1, bindCell); |
185 curTable->resizeColumnsToContents(); |
191 curTable->resizeColumnsToContents(); |
186 curTable->setFixedHeight(curTable->verticalHeader()->length() + 10); |
192 curTable->setFixedHeight(curTable->verticalHeader()->length() + 10); |
187 |
193 |