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

Qt::AccessibleDescriptionRole and Qt::AccessibleTextRole not working in QTableWidget

    XMLWordPrintable

Details

    • e797ba558dddd45522b5a317316e497e9efc44a8

    Description

      When tabbing QTableWidgt cell items, incorrect text is spoken in windows narrator. Setting text to cells with Qt::AccessibleDescriptionRole and Qt::AccessibleTextRole doesn't work.

      Following code describes the problem:

      int main(int argc,char*argv[])
      {

      QApplication a(argc, argv);
      QTableWidget tableWidget;
      QAbstractItemModel* tableModel = tableWidget.model();
      tableModel->insertColumns( 0, 2 );
      tableModel->insertRows( 0, 2 );

      for( int row = 0 ; row < 1 ; ++row )
      {
      for( int column = 0 ; column < 1 ; ++column )

      { tableModel->setData( tableModel->index( row, column ), QObject::tr( "row %1, column %2" ).arg(row).arg(column), Qt::DisplayRole ); tableModel->setData( tableModel->index( row, column ), QObject::tr( "row %1, column %2 DESCRIPTION" ).arg(row).arg(column), Qt::AccessibleDescriptionRole ); tableModel->setData( tableModel->index( row, column ), QObject::tr( "row %1, column %2 TEXT" ).arg(row).arg(column), Qt::AccessibleTextRole ); }

      }

      tableWidget.show();
      return a.exec();
      }

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            smd Jan Arve
            qtcomsupport Qt Support
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes