Your browser does not seem to support JavaScript. As a result, your viewing experience will be diminished, and you have been placed in read-only mode.
Please download a browser that supports JavaScript, or enable it if it's disabled (i.e. NoScript).
I tried this:
QSize sizeOfTableView = tableView->size(); QSize sizeOfWindow = this->size(); resize(sizeOfTableView.width(), sizeOfWindow.height());
it does not work as expected!
@jdent Behaviour may depend on where/when you call this code.
@jdent Show us a screenshot of what you get.
As I said earlier, the sizes of the inner widgets are valid once the dialog is shown.
@mpergand ok, how can I capture the moment a dialog is shown??
In MFC there was a OnInitDialog() method.... nothing similar here? There must be a signal to trap...
@jdent said in I want to resize a dialog to the width of a QTableView inside of it....:
how can I capture the moment a dialog is shown??
What's your use case ?
@jdent Answered https://forum.qt.io/topic/115490/cdialog-oninitdialog