QToolButton with icon + text: How to center both?
问题 I am using multiple QToolButtons in a custom QGridLayout widget. The buttons are set to display icon + text based on an assigned default QAction. The only issue is that the content (icon + text) is always left-aligned. The content (icon + text, marked as a red box in the screenshot), should be center in the button (indicated by the blue box). For most cases this is just fine, given that Qt automatically tries to render that button with the minimal size. However I am stretching the button to