このコードは、画像を正しく表示し、ウィンドウのサイズが変更されたときにサイズを変更します。
QLabel *imageLabel;
QTabWidget *imageTabWidget;
// new...
imageTabWidget->addTab(imageLabel, "Image");
画像をテーブルに配置するのと同じ動作が必要です(まだ前のタブ内にあります)。ただし、今取得できるのは固定サイズの画像だけです。
QTableWidget *innerTable = new QTableWidget;
innerTable->setRowCount(1);
innerTable->setColumnCount(1);
innerTable->setCellWidget(0, 0, imageLabel);
innerTable->resizeColumnsToContents();
innerTable->resizeRowsToContents();
imageTabWidget->addTab(innerTable, "Image");
サイズ変更可能なテーブルを持つことはまったく可能ですか?
ありがとうございました。