[Development] App name in window title

David Faure faure at kde.org
Thu Jun 21 16:38:02 CEST 2012


KDE4 (KDialog) has a nice feature that makes the application name appear in 
the window title bar.

I think it's very nice to know which application a window comes from. 
Especially for the worst case: error message boxes :)

QDialog itself doesn't do that, which leads to the question of: how should we 
do this with Qt 5?

One solution would be to do this in QWindow. Maybe not on all desktop 
platforms, if some of them already do something about this... any idea if this 
would be good or bad, on Windows and Mac OS X?

This requires to add a QCoreApplication::setApplicationDisplayName() though, 
we want a capitalized (and potentially translated) name like "KMail", not 
applicationName() which is "kmail".

How does this sound?

PS: I briefly thought of another solution, especially if this isn't needed on 
other platforms: letting KWin do it... I'm not sure how it could find out the 
translated application name (maybe via some X property?). And this might 
create the risk that apps (KDE4 apps, non-Qt apps) end up with the app name 
twice in the titlebar. So maybe this isn't a good solution after all, I just 
wanted to raise the idea in case I missed something that makes it good.

-- 
David Faure, faure at kde.org, http://www.davidfaure.fr
Sponsored by Nokia to work on KDE, incl. KDE Frameworks 5




More information about the Development mailing list