سؤال

How can I resize, automatically, any widget, to the paintEvent's method generated content dimensions?

هل كانت مفيدة؟

المحلول

Don't try to do that. Resizing would generate a new paint event, and in the best case you would end up with flickering in your UI. You will need to calculate your widget size outside the paint event.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top