의도하지 않은 빈 블록
이 경고 카테고리의 철자는 [unintentional-empty-block] 입니다.
의도하지 않은 빈 블록
무슨 일이 일어났나요?
빈 블록이 속성 바인딩의 표현식으로 선언되었습니다.
대신 빈 객체 리터럴을 선언하려고 했을 수 있습니다. 이렇게 하려면 리터럴을 괄호로 묶으세요. 이는 빈 블록에서 리터럴을 명확하게 구분하기 위해 필요합니다.
왜 나쁜가요?
인스트럭션이 없는 블록을 속성 바인딩으로 지정하면 아무 소용이 없으며 독자에게 혼란을 줄 수 있습니다. 해당 바인딩을 평가할 때 인스트럭션이 실행되지 않고 바인딩이 정의되지 않은 것으로 평가됩니다.
예제
이 경고를 해결하려면 객체 리터럴을 괄호로 묶거나 바인딩을 완전히 제거하세요:
© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.