I redidĀ theĀ toolbar hookfunction after thinking about it and checking qm help.
This is the proper way to do it. Should not use thread variables in qm toolbar hook functions
Code corrected in post above
This is the proper way to do it. Should not use thread variables in qm toolbar hook functions
Code corrected in post above