문제

I issued in problem with custom item delegate for QTableView.

That problem is completely illustrated by that screenshoot:

enter image description here

We can see item content behind item delegate editor. What is the best way to hide that content or make item delegate not transparent? (how I can get background color/brush for edited row?)

도움이 되었습니까?

해결책

You need to let your editor to paint its own background by enabling the autofill background property:

editor->setAutoFillBackground(true);

다른 팁

widget->setStyleSheet("background-color: #eee;");

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top