سؤال

I am writing a QDialog to allow exporting data from the rest of my program. The dialog asks as series of questions depending on the previous answers given. There are three different types of question that can be asked, with a QComboBox, QList or a QCheckbox. When displaying the QComboBox, it's fine, but when displaying the other two, it causes the other widgets to be painted black.

http://imgur.com/GCe9YgA [Works] http://imgur.com/biefPir [Doesn't work]

ExportOption* option = new ExportOption(question, type, nullptr);
ui_->optionsLayout_->insertWidget(shownOptions_.size(), option);
adjustSize();

This only happens when the dialog needs to resize, if there is enough room to begin with, it isn't displayed black. Also, it is fixed whenever the dialog redraws for resizing or any other reason, but if I manually call update\repaint on the dialog or it's children, nothing seems to happen.

I assume it's something fairly simple that I'm missing.

I am using Qt5.1 on Windows.

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

المحلول

Thanks for the help guys, but it turned out to be an errant stylesheet.

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