I have a QDialog that I'm using to display a tableWidget. The tableWidget contents are the result of a database query. In another dialog the user selects a series of checkboxes that ultimatley determines the query and each checkbox represents a column from a database table. So, I made the QDialog box that holds the tableWidget really wide but depending on which checkboxes the user clicks, I may only display 1 column or up to 10 columns. My question is, how do I programatically set the Dialog's width based on the width of the tableWidget? When I only have a few columns to display there's a lot of white space to the right of the last column.
TIA.
Bookmarks