how to set alignment of combo box added in QTablewidget?
-
hi I added combo box in one column of QtableWidget , All the functionality is fine styling of combo box is also Ok but I problem in positioning the combo box , I want to align it as Qt::AlignVCenter and I have no idea how to do it.
m_grid is QtableWidget
slabThicknessComboBox * temp9 = new slabThicknessComboBox(m_grid->rowCount() - 1,3,levelToAddToTable->getSlabDepth(),m_slabDepths,this); connect(this,SIGNAL(setComboBoxStylSheetSignal()),temp9,SLOT(setComboBoxStylSheetSlot())); emit setComboBoxStylSheetSignal(); connect(temp9, SIGNAL(mouseEnteredBoxSignal(int)), this, SLOT(comboboxWasHovered(int))); connect(temp9,SIGNAL(indexChangeSignal(int,int,int)),this, SLOT(enablecellInGridClickedFromSlecBoxSlot(int ,int,int))); m_grid->setCellWidget(m_grid->rowCount() - 1, 3, temp9); -
Hi
Widgets placed on top of a cell with setCellWidget normally fill the whole cell
so im not really sure what you want to align ?
You mean the actual text of it / the items ?https://forum.qt.io/topic/49122/solved-qcombobox-align-center/3
-
Hi
Widgets placed on top of a cell with setCellWidget normally fill the whole cell
so im not really sure what you want to align ?
You mean the actual text of it / the items ?https://forum.qt.io/topic/49122/solved-qcombobox-align-center/3