Your MainWindow::slotOnAnnouncement(const QString &msg)
does the right thing: create the event with the message string, and send it to
the accessibility system via updateAccessibility(&event).
You can call that function from any code where you have access to your
MainWindow instance; and you ca
> On 13 Jun 2024, at 11:48, Corentin Bacqué-cazenave via Interest
> wrote:
>
> Hi,
> I'm trying to implement the new QAccessibleAnnouncementEvent in my project.
> However, I have a class to hander some TTS functions, and this class is not
> derived from QObject.
> Is there a way to use QAccess
My idea is to instantiate QAccessibleAnnouncementEvent in the main
window class of the app, and then exteren this instance to use in other
class. Then, we can just call the instance with setMessage.
For now I tried to extern a QObject of my main window and use this
object in my non object clas
I don’t think I understand the problem.
Are you not able to instantiate QAccessibleAnnouncementEvent because you are
not in C++? Or do you not have access to Qt APIs?
If adding QAccessibleAnnouncementEvent::setMessage would help, then how do you
get hold of the QAccessibleAnnouncementEvent inst
Hi,
yes, I understand, but in this case, how should we make to send a
notification from everywhere. In the project I'm contributing to, we
have to send notification for some events (E.G. by an user send a
message, or when we change the volume), so we have just a method to send
a text to speec
Hi,
I'm trying to implement the new QAccessibleAnnouncementEvent in my
project. However, I have a class to hander some TTS functions, and this
class is not derived from QObject.
Is there a way to use QAccessibleAnnouncementEvent to send a
notification to screenreaders without a QObject class