Results 1 to 3 of 3

Thread: C++/Qt5 Show underscore on button caption - Windows 10

  1. #1
    Join Date
    Oct 2006
    Posts
    105
    Thanks
    13
    Thanked 4 Times in 4 Posts
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows

    Default C++/Qt5 Show underscore on button caption - Windows 10

    Hello,

    Windows 10
    Qt Creator 3.6.1
    Based on Qt 5.6.0

    Qt Code:
    1. void MainWindow:: on_button_clicked()
    2. {
    3. ...
    4. QPushButton *pb = new QPushButton("&Close", choice);
    5. pb->setGeometry(22, g1->x() + g1->height() + 5, 70, 25);
    6. QObject::connect(pb, SIGNAL(clicked()), this, SLOT(pb_clicked()));
    7. ...
    8. }
    To copy to clipboard, switch view to plain text mode 
    Alt + C works.
    The underline doesn't show on the 'C' in the button caption.
    Is this a problem with the fonts in Windows 10?
    Is there a way round it?

    Regards

    Edited - Changed Ctrl for Alt.
    Last edited by jimbo; 10th May 2016 at 22:32.

  2. #2
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: C++/Qt5 Show underscore on button caption - Windows 10

    Does the ampersand show on the button? If not then Qt is probably doing the right thing with it. The lack of an underscore is probably then a function of the Windows theme.
    Does the C gain an underline when hold down the Alt key? When you hover over or focus the button? When you do both?

  3. #3
    Join Date
    Oct 2006
    Posts
    105
    Thanks
    13
    Thanked 4 Times in 4 Posts
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows

    Default Re: C++/Qt5 Show underscore on button caption - Windows 10

    Hello ChrisW67,

    Does the ampersand show on the button?
    No.
    Does the C gain an underline when hold down the Alt key?
    Yes.
    When you hover over or focus the button?
    No.

    I 'think' I have read somewhere that Windows 10 is not using True Type anymore???
    I guess I'll have to wait for the Qt developers to catch up.

    Regards

Similar Threads

  1. Replies: 1
    Last Post: 8th June 2013, 16:45
  2. button doesn't show up
    By Qqt in forum Newbie
    Replies: 2
    Last Post: 13th December 2010, 08:03
  3. Show new window on button click
    By jojanpm in forum Newbie
    Replies: 1
    Last Post: 29th November 2010, 12:51
  4. qtopia window decoration cannot show caption
    By qtopiahooo in forum Qt for Embedded and Mobile
    Replies: 1
    Last Post: 13th March 2007, 08:09
  5. window decoration cannot show caption
    By qtopiahooo in forum Qt Programming
    Replies: 1
    Last Post: 31st January 2007, 08:17

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.