Recent

Author Topic: Qt5 new Accessible features.  (Read 3398 times)

dbannon

  • Hero Member
  • *****
  • Posts: 2786
    • tomboy-ng, a rewrite of the classic Tomboy
Qt5 new Accessible features.
« on: April 11, 2021, 07:16:07 am »
Putting aside for the moment the issues in https://forum.lazarus.freepascal.org/index.php/topic,54010.0.html I find that I cannot get recent Accessible additions to Qt5 in trunk to work anyway.

There has been no relevant additions to https://wiki.lazarus.freepascal.org/LCL_Accessibility since 2013 and I can find no other 'Accessible' documentation anywhere so it's quite likely I am not using it correctly. But what I have done is -

* Activated Orca.
* Opened several other applications, LibraOffice etc and listened to Orca's  screen reader respond to menu clicks, cursor movements etc.
* Installed libqt5pas 1.2.9
* Made a lazarus trunk qt5 app that has menus, buttons, a memo with some text.
* Moving around in that app invokes no response from Orca at all.

Is there something that needs to be done, perhaps at a project level, to enables the Accessible features ?   

Davo


 
Lazarus 3, Linux (and reluctantly Win10/11, OSX Monterey)
My Project - https://github.com/tomboy-notes/tomboy-ng and my github - https://github.com/davidbannon

zeljko

  • Hero Member
  • *****
  • Posts: 1594
    • http://wiki.lazarus.freepascal.org/User:Zeljan
Re: Qt5 new Accessible features.
« Reply #1 on: April 11, 2021, 10:05:19 pm »
I really don't know. I can see that LCLQt5 accessibility have memory leaks (use app with heaptrc) for some reason,
also I have some strange crashes in my app that comes from accessibility.

dbannon

  • Hero Member
  • *****
  • Posts: 2786
    • tomboy-ng, a rewrite of the classic Tomboy
Re: Qt5 new Accessible features.
« Reply #2 on: April 12, 2021, 02:08:27 am »
Hmm, I have not see either memory leak or crash in my small test project.  So I tried it on my real app, tomboy-ng and yep, segfaults.  But not predictable, seems to happen in different places.

I now have the April 4th changes wrapped up in some $ifdefs so its easy to prove the problems are not there when I "turn Accessibility off". (want the patch ?).

I am pretty sure the problems start once the loop starts, everything is created OK. I think I will go back to my small test project and add some stuff to it and see how much I must add before something breaks, will be easier to debug that tomboy-ng which has got quite large.

When time permits ...

Davo
Lazarus 3, Linux (and reluctantly Win10/11, OSX Monterey)
My Project - https://github.com/tomboy-notes/tomboy-ng and my github - https://github.com/davidbannon

dbannon

  • Hero Member
  • *****
  • Posts: 2786
    • tomboy-ng, a rewrite of the classic Tomboy
Re: Qt5 new Accessible features.
« Reply #3 on: April 12, 2021, 09:21:11 am »
OK, in my app it seems to fail with a call to TWinControl.CreateWnd when dealing with a TUpDown control.

So, I put an UpDown control on my small test project and now it seg faults too.  So, thats certainly one problem !
 
Afraid thats as far as I will be able to get at the moment....

Davo
Lazarus 3, Linux (and reluctantly Win10/11, OSX Monterey)
My Project - https://github.com/tomboy-notes/tomboy-ng and my github - https://github.com/davidbannon

zeljko

  • Hero Member
  • *****
  • Posts: 1594
    • http://wiki.lazarus.freepascal.org/User:Zeljan
Re: Qt5 new Accessible features.
« Reply #4 on: April 12, 2021, 10:34:50 am »
In that case I'll add define QTUSEACCESSIBILITY in qtdefines.inc and disable it by default (so qt56.pas and other .pas units won't use it by default).

dbannon

  • Hero Member
  • *****
  • Posts: 2786
    • tomboy-ng, a rewrite of the classic Tomboy
Re: Qt5 new Accessible features.
« Reply #5 on: April 12, 2021, 01:32:11 pm »

> In that case I'll add define QTUSEACCESSIBILITY in qtdefines.inc

Here is a patch that does just that, except I used "QT5DEV", run from lcl/interfaces,   patch -p0 <my.patch

I think its a very good thing that we have support built in for people who have a problem such as sight but I don't think that code is ready yet.  But  having the bindings in the library now means that the distros will have time to get it into their repositories.

Thanks for the great work you do with QT5 !

Davo
Lazarus 3, Linux (and reluctantly Win10/11, OSX Monterey)
My Project - https://github.com/tomboy-notes/tomboy-ng and my github - https://github.com/davidbannon

zeljko

  • Hero Member
  • *****
  • Posts: 1594
    • http://wiki.lazarus.freepascal.org/User:Zeljan
Re: Qt5 new Accessible features.
« Reply #6 on: April 13, 2021, 12:57:41 pm »
I've added QTACCESSIBILITY define into qtdefines.inc, it's disabled by default.

 

TinyPortal © 2005-2018