update qtjs: replace method with an inbuilt one