Forum
Sign Up

setAccessibleName

13 years 4 months ago #1 by
setAccessibleName was created by
Hi,

i have add an action to a ribbon bar like:

QAction* pProjectReport = groupManagement->addAction(QIcon(":/Resources/32x32/Reports 3d.png"), tr("Gesamtdoku. erstellen"), Qt::ToolButtonTextUnderIcon);

how can i set the accessibleName for that action to help my blind colleague to work with the program.

Thanks

Please Log in or Create an account to join the conversation.

  • 's Avatar Topic Author
13 years 4 months ago #2 by Developer Machines
Thank you for extremely interesting question.
If i understand you correctly, you need to call the setAccessibleName(...) for widget using
that action. To get a list of widgets you can use the following function from QAction:
QList<QWidget *> QAction::associatedWidgets() const;

Let me know the results.

Please Log in or Create an account to join the conversation.

More
13 years 4 months ago #3 by
Replied by on topic setAccessibleName
It doesn't work. I can test ist by yourself, if you download NVDA for windows. There is a second question:
On a ribbon page i can navigate between groups with the tab keys. How can i enter one group and navigate between the group items? My colleague can only work with the keyboard.
Thanks

Please Log in or Create an account to join the conversation.

  • 's Avatar Topic Author
13 years 4 months ago #4 by Developer Machines
>>It doesn't work
Send me the complete code, how you set setAccessibleName().

Please Log in or Create an account to join the conversation.

More
13 years 4 months ago #5 by
Replied by on topic setAccessibleName
Hi,
here is my source code:

if(Qtitan::RibbonGroup* groupManagement = page->addGroup(tr("Verwaltung")))
{
groupManagement->setAccessibleName(tr("Verwaltung"));

QIcon iconCreateProject;
iconCreateProject.addPixmap(QPixmap(":/Resources/32x32/New folder.png"));
QAction * pCreateProject = groupManagement->addAction(iconCreateProject, tr("Neues Projekt"), Qt::ToolButtonTextUnderIcon);
pCreateProject->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_N));

QList<QWidget*>widgetList = pCreateProject->associatedWidgets();
foreach(QWidget* pWidget, widgetList)
{
pWidget->setAccessibleName(tr("Neues Projekt erstellen"));
}
}

Please Log in or Create an account to join the conversation.

  • 's Avatar Topic Author
13 years 4 months ago #6 by Developer Machines
In this example, widgetList will contain two widgets. One of them is QtoolButton (what you need). The second will be groupManagement - you need ignore it.
In addition, if it possible, please tell me how you solve this problem with standard Qt tool bar?

Please Log in or Create an account to join the conversation.

More
  • Not Allowed: to create new topic.
  • Not Allowed: to reply.
  • Not Allowed: to edit your message.
Moderators: Developer Machines
Time to create page: 0.154 seconds

Developer Newsletter

Join our Developer Machines newsletter to get informed on all the latest releases of the commercial components for Qt.C++, Delphi FireMonkey, updates and general knowledges.

Quick Support

Should you need any additional information about our products or licensing, please contact us at the following email addresses:

  • This email address is being protected from spambots. You need JavaScript enabled to view it.

  • This email address is being protected from spambots. You need JavaScript enabled to view it.

Get in Touch

If you would like to purchase our products or services, but don’t know how to do it the right way, please feel free to contact us:

  • This email address is being protected from spambots. You need JavaScript enabled to view it.( any questions related to our products or services )
  • This email address is being protected from spambots. You need JavaScript enabled to view it.( questions related to licensing )