1 Attachment(s)
QTableView default font and header sizes changes from Qt5.9 to Qt5.12
Hi everybody!
I have a problem with QTableWidget fonts. I recently chaged from Qt5.9 to Qt5.12 version. With Qt5.9, the font of the QTableWidget used in my dialogs seems smaller than in Qt5.12. Due this change, lots of dialogs of my program have been deconfigured. I need to find a general solution to solve this, because the configuration of each QTableWidget used in my program could be a very hard work.
I attach some examples of tables. I can not modify the sizes of Dialogs to allow see the tables bigger. The only solution is reduce the font and header sizes, but preferently with a general solution. The same problem occours with QTreeWidget.
Thanks in advance.
Re: QTableView default font and header sizes changes from Qt5.9 to Qt5.12
You should be able to set a stylesheet at the application or top widget level. Perhaps something like:
Code:
qApp->setStyleSheet("QTableView { font-family: \"Times New Roman\"; font-size: 9pt }");
Re: QTableView default font and header sizes changes from Qt5.9 to Qt5.12
Quote:
Originally Posted by
ChrisW67
You should be able to set a
stylesheet at the application or top widget level. Perhaps something like:
Code:
qApp->setStyleSheet("QTableView { font-family: \"Times New Roman\"; font-size: 9pt }");
Thank you!! It works!!;)