Im trying to display a QComboBox inside a QTableWidgetItem by setting it as its child using this code:
QComboBox* qcb; int r,c; //...... qcb->setParent((QWidget*)tableWidget->item(r,c));
but it did not help.
so how to fix it? thank.
You do this through the object itself QTableWidget.
QTableWidget
void QTableWidget::setCellWidget ( int row, int column, QWidget * widget )
http://qt-project.org/doc/qt-4.8/qtablewidget.html#setCellWidget
Perhaps you want to add a widget to a QTableWidget using
and access it using
QWidget * QTableWidget::cellWidget ( int row, int column ) const
Source: https://habr.com/ru/post/1533238/More articles:Define and extract a table from pdf using java - javaWhy can't I directly move a byte to a 64-bit register? - assemblyjs angular expression in ng-repeat - javascriptServer Side OAuth2 in Dart - dartCreating a template based on an inner class - c ++Неустранимая ошибка: файл stdafx.h не найден - c++pdfbox 2.0.2> Call the pageDrawer.processPage method of exceptions - javaFiltering ListFragment from ActionBar in parent activity - androidWhy is MOV AH, 1 not supported in 64-bit Intel microprocessor mode? - assemblypdfbox 2.0.2> Как объединить координаты TextPosition и Graphics GeneralPath в один и тот же квадрант - pdfAll Articles