Qt World Summit: Register Today!

Disabling accessibility support on Mac

  • We are using Qt 5.4.1 and accessibility support on Mac seems pretty flaky. For starters, our app would crash if if Voice Over is enabled (looking at the callstack it seems to hit a recursive code and resulted in a stack overflow)?

    Instead of trying to fix this, is there any way an application can opt out of accessibility altogether? I tried setting the QAccessible::setRootObject but that didn't work. Would implementing a custom InterfaceFactory and returning a dummy accessibility interface work? If so, what is the best thing to do for the dummy? I tried just returning null or 0, false, etc but they all eventually crash at some point (related to accessibility).

  • Moderators

    @Thuan_Firelight I can't help you with disabling the accessibility support, but have you considert increasing the stack size?

    IIRC MacOS limits all non mainthreads to 100 or 200k (BYTES!). In my opinion that is so < (year)2000 but, it is what it is. Thankfully we have ways to increase that on the go. I've run into stackoverflow on mac during recursive calculations before and the only thing put on the stack was the return adress for when the functions returns.

Log in to reply