0

I recently posted a question on Stack Overflow that is related (but not entirely the same) to this one:

How to resize the QMenuBar in PyQt4 for a 4K display

Thanks to the help of the Stack Overflow community, I can change the sizes of icons and fonts of various Widgets (like buttons, menubars, statusbars, ...) in PyQt4. There is however one problem that is not solved entirely. The icon in the top left corner of the GUI and the Window title are not adjustable in size. This is a real problem, since several users might have a 4K display nowadays. The extremely tiny icon in the top left corner and the unreadable Window title become effectively useless. I got the following comment:

My comment: Only the Window title is stuck at the small font size. How would you enlarge the window title size with PyQt4?

Reply: Can't change it with Qt. That's drawn by your OS window manager

I understand from this reply that the only way to deal with the problem is changing the general settings of your Operating System. In Windows that would be:

Control Panel > Appearance and Personalisation > Display > "set a custom scaling level"

This solution works indeed, but it changes just about every program you use. No one is going to do that for a tiny Python program they'd like to use..

Does anyone know a clever solution?

Community
  • 1
  • 1
K.Mulier
  • 8,069
  • 15
  • 79
  • 141
  • @ngulam I don't agree. This question asks for a clever solution. One such solution would be to hide the window title (make a frameless widget) and then reimplement the equivalent functionality of the title bar in a widget from within Python. – three_pineapples Apr 11 '16 at 07:32
  • related: http://stackoverflow.com/a/10712258/1994235 (although there are [tradeoffs](http://python.6.x6.nabble.com/Skinning-the-title-bar-and-window-border-td1915843.html#a1915851)) – three_pineapples Apr 11 '16 at 07:33
  • Why do you want to change this for just one application? If the text is small for your application, won't it also be small for other applications? Some users like having low scaling, it gives them more screen real estate. By trying to override this in your application, you're ignoring the user's preferred settings. – Brendan Abel Apr 11 '16 at 15:45
  • Yes, you're right. It is sometimes difficult to find the balance. – K.Mulier Apr 12 '16 at 21:29

0 Answers0