If your control can't fetch keyboard focus in Qt Quick......

Use forceActiveFocus() method.

To get the keyboard focus, you have to set focus:true from the very root of all visual parents the control is attached. If the structure becomes complicated, you have no idea on where to "power on" and where not. In that case, use forceActiveFocus() to make any necessary attribute changes at once.

Man I had to throw away yesterday not knowing this. OTL

Qt Quick에서 뭔 짓을 해도 컨트롤이 키보드 포커스를 가져오지 못한다면......

forceActiveFocus() method를 사용하면 됩니다.

원래 키보드 포커스는 visual parent에서 해당 컨트롤의 모든 부모계통 컨트롤이 속성을 focus: true로 놓도록 설정되어야 잡히는데, 구조가 복잡해지면 어느게 어느거고 어떻게 영향을 받는지 감이 안 잡히는 상황이 발생합니다. 이때 forceActiveFocus()를 사용하면 필요한 부분을 다 알아서 자동으로 바꿔줍니다.

......이거 몰라서 어제 하루 날려먹었네요. OTL

PostgreSQL vs. SQLite: read & write in multithreaded environment

The start was humble. I needed to cache some data, and I thought just push them to database table and give index, and the rest will be datab...

Popular in Code{nested}