Track QHeaderView geometry

  • I'm trying to adjust a margin of a layout depending on the width of QHeadeView. There is a QHeadeView::geometriesChanged() signal, which expected signals any header geometry changes. However debug shows that this signal is not emitted, when the corresponding model is reset, for example. If a call my slot manually - the margin is updated correctly, but any changes in underlying QAbstractTableModel are ignored.
    Is there any other way to achieve what I want?
    MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent)
    &QHeaderView::geometriesChanged, = {
    int width=this->ui->tradeTableView->verticalHeader()->width();
    } );

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.