Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-23396

wrong display of & in qtoolbutton's default action

    XMLWordPrintable

Details

    • 4db5d3ccd17d448b59db491e2f261892f31fec74

    Description

      Ampersands are wrongly displayed in the qtoolbutton's default action. A single & is ignored, a && underlines the next character and &&& is displayed as a single & without any underlines

      ui->toolButton->setPopupMode(QToolButton::MenuButtonPopup);
      ui->toolButton->addAction(new QAction("0xy",this));
      ui->toolButton->addAction(new QAction("1x&y",this));
      ui->toolButton->addAction(new QAction("2x&&y",this));
      ui->toolButton->addAction(new QAction("3x&&&y",this));
      ui->toolButton->addAction(new QAction("4x&&&&y",this));
      //ui->toolButton->setDefaultAction(ui->toolButton->actions()[1]); //action "1x&y", should be displayed as underlined y, but is displayed as plain "xy"
      ui->toolButton->setDefaultAction(ui->toolButton->actions()[2]); //action "1x&&y", should be displayed as "x&y", but is displayed as "xy" with underlined y

      Attachments

        1. qtbug23396.jpg
          qtbug23396.jpg
          38 kB
        2. qtbug23396.zip
          1 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            tvete Paul Olav Tvete
            benibela Benito van der Zander
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes