By reading the documentation for QHeaderView.
By reading the documentation for QHeaderView.
You have two choices. Like yeye_olive said, if you had read the documentation for QHeaderView, you would know that you can set QHeaderView::setResizeMode(QHeaderView::ResizeToCo ntents) to automatically resize for you. But if you do that you can't change the size of the columns to whatever you want. So what I would do is to re-call resizeColumnsToCentents() after you have processed the QEvent::LanguageChange event.
I'd read the document and I know QHeaderView::setResizeMode() but I dont like it 'cause I cant change the size of the columns.
So, re-call resizeColumnsToContent() may be a better way.
But, problem is: I cant find the thing resizeColumnsToContent() in document QHeaderView (and QAbstractItemView). How can I find this ?
I'm not kidding. Maybe this is a stupid question, so plz help me.
Did you mean " just read your first post above." about: ui->tblCivilianFlightPlan->resizeColumnsToContents(); ???
But, My question is about function resizeColumnsToContent() of QHeaderView, not for QTableView. Or I'm using wrong word about size of section of header (my english is not good).
In addition, I have trouble with tab size - QTabWidget too T___T (after switching language, tabwidget does not show completely tabText).
Bookmarks