Results 1 to 8 of 8

Thread: Windows Title

  1. #1
    Join Date
    Jan 2009
    Location
    Midlands UK
    Posts
    62
    Thanks
    6
    Thanked 9 Times in 6 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Windows Title

    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

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,017 Times in 4,793 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Windows Title

    Use the native API.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. The following user says thank you to wysota for this useful post:

    SteveH (21st November 2010)

  4. #3
    Join Date
    Sep 2009
    Location
    UK
    Posts
    2,447
    Thanks
    6
    Thanked 348 Times in 333 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Windows Title

    You can do it in exactly the same way as the Borland Builder program does it.

  5. The following user says thank you to squidge for this useful post:

    SteveH (21st November 2010)

  6. #4
    Join Date
    Jan 2009
    Location
    Midlands UK
    Posts
    62
    Thanks
    6
    Thanked 9 Times in 6 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Windows Title

    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

  7. #5
    Join Date
    Sep 2010
    Posts
    145
    Thanks
    1
    Thanked 18 Times in 17 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Windows Title


  8. The following user says thank you to Timoteo for this useful post:

    SteveH (22nd November 2010)

  9. #6
    Join Date
    Jan 2009
    Location
    Midlands UK
    Posts
    62
    Thanks
    6
    Thanked 9 Times in 6 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Windows Title

    Quote Originally Posted by Timoteo View Post
    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

  10. #7
    Join Date
    Sep 2010
    Posts
    145
    Thanks
    1
    Thanked 18 Times in 17 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Windows Title

    Did you actually click the link? It is to MSDN - it is a Windows API function.

  11. #8
    Join Date
    Jan 2009
    Location
    Midlands UK
    Posts
    62
    Thanks
    6
    Thanked 9 Times in 6 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Windows Title

    Quote Originally Posted by Timoteo View Post
    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.

Similar Threads

  1. Title Bar in QMainWindow
    By kavinsiva in forum Newbie
    Replies: 1
    Last Post: 24th September 2009, 13:51
  2. Replies: 0
    Last Post: 6th September 2009, 21:58
  3. widget without title bar???
    By db in forum Newbie
    Replies: 3
    Last Post: 30th August 2007, 21:16
  4. Title Bar Color
    By kaaty in forum Qt Programming
    Replies: 1
    Last Post: 8th December 2006, 16:32
  5. [QT3 + XP] How to avoid the windows title bar
    By incapacitant in forum Newbie
    Replies: 5
    Last Post: 16th February 2006, 21:43

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.