PDA

View Full Version : Windows Title



SteveH
20th November 2010, 19:51
Hi all,

Is it possible on a MS Windows system to set the text in the application's 'button' in the OS system task bar on the bottom of the screen to something different to the application's main window title text ?

I use 'setWindowTitle(QString)' to set the MainWindow title but nothing i've found in the help files or on the forums suggest another method to set the other text (only related post I found thought it could not be done).

I'm porting a large program from Borland Builder that has this feature. (it allows the task bar button to have something short and meaningfull instead of the truncated front of the MainWindow title).

SteveH

wysota
20th November 2010, 21:59
Use the native API.

squidge
20th November 2010, 23:04
You can do it in exactly the same way as the Borland Builder program does it.

SteveH
21st November 2010, 19:03
Thanks Wysota and Squidge for the reply.

I was hoping for a built in Qt function but it looks like I'll have to dig into the API's (at first glance on MSDN it looks like a read only function - but Borland allows me to set it ok ?).

Note - I looked into the Qt 'setApplicationName' but it does not seem to affect the mainwindow title or the taskbar button title no matter where I set it (in main.ccp or mainwindow.cpp).

SteveH

Timoteo
21st November 2010, 19:09
SetWindowText (http://msdn.microsoft.com/en-us/library/ms633546(VS.85).aspx)

SteveH
22nd November 2010, 10:56
SetWindowText (http://msdn.microsoft.com/en-us/library/ms633546(VS.85).aspx)

Thanks but don't you mean 'setWindowTitle' - I couldn't find any reference to 'setWindowText' in the Qt help files. 'setWindowTitle' is what I normally use, unfortunately it sets the same text in the window title bar and the OS task bar button which is ok if the title text is short enough to be meaningfull in the task bar button.

SteveH

Timoteo
22nd November 2010, 13:22
Did you actually click the link? It is to MSDN - it is a Windows API function.

SteveH
22nd November 2010, 13:34
SetWindowText (http://msdn.microsoft.com/en-us/library/ms633546(VS.85).aspx)

Sorry Timoteo - I didn't spot your post was a link (must put my color glasses on !) - looks like it might be what I am looking for I'll go away and check it out.

Thanks.