3

I was wondering how we can change the title font of the QT Main window. Please see the attached screenshot.. I tried changing style sheet etc, but it dint work. Also I tried to use c++ send message, but this dint work either :(

SendMessage(form->effectiveWinId(), WM_SETFONT, ( WPARAM ) dF, (LPARAM) TRUE);

enter image description here

Response appreciated. Thanks

svlasov
  • 9,923
  • 2
  • 38
  • 39
user476566
  • 1,319
  • 3
  • 26
  • 42

1 Answers1

3

You can't. It's enforced by the system and is only changeable by the user through the desktop preferences. And it's a good thing too, otherwise applications like that would get on people's nerves by not obeying the desktop settings.

Nikos C.
  • 50,738
  • 9
  • 71
  • 96
  • Thanks for your response. What desktop preferences can be used to change the font ? You mean reset the DPI settings to 100 / 125 %.? Also if win32 has handle to the main window, should it not be possible to change the font ? – user476566 Jun 21 '13 at 23:41
  • @user476566 The setting depends on the OS. On XP, you right click the desktop, select "Properties", then the "Appearance" tab, then click the "Advanced" button. There, you can click in the title bar of a window inside the preview window which allows you to configure title bar settings. Having a handle to the main window doesn't mean anything; the system will *not allow* you to change the font. It's an explicit decision, not an oversight. And it's the same across all major platforms; none of them will allow you to set the font because that would annoy users to no end. – Nikos C. Jun 22 '13 at 06:31