سؤال

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