Qt6 topics merged with General

[solved] QTableView and QLineEdit

  • Hi,
    I'd like to put QLineEdit above QTableView and adhere to QTableView's columns. When I resize column or table every line edit should have the same width with coulumn below. How can i do this ?

    alt text

  • HI and welcome to devnet,

    you can connect a slot to the QHeaderView::sectionResized() signal to be notified when a column is resized

    connect(tableView->horizontalHeader(), &QHeaderView::sectionResized, 
                   this, &MyWIdget::slotColumnResized);