I've created a custom class(DeviceState_Indicator) which inherits QPushButton. I want to use that as an LED indicator and I'm successful in doing that. Now I've placed that widget in a cell of a QTableWidget.
for(int iCount = 0; iCount < NUM_OF_DEVICES; iCount++)
{
oDeviceStateIndication[iCount] = new DeviceState_Indicator(0, INDICATOR_GREEN);
oDevStatePanel->setCellWidget(iCount, 2, oDeviceStateIndication[iCount]);
}
for(int iCount = 0; iCount < NUM_OF_DEVICES; iCount++)
{
oDeviceStateIndication[iCount] = new DeviceState_Indicator(0, INDICATOR_GREEN);
oDevStatePanel->setCellWidget(iCount, 2, oDeviceStateIndication[iCount]);
}
To copy to clipboard, switch view to plain text mode
The problem is, I'm unable to align the DeviceState_Indicator widget to the center (as shown in the pic attached). How do I align it to center?
Bookmarks