From 16b90bb68343dc45a34d59083a2b62200fcc9551 Mon Sep 17 00:00:00 2001 From: Jan Arve Saether Date: Thu, 12 Jun 2014 20:55:21 +0200 Subject: QFontComboBox sometimes became too wide because of wrong fixed size The fixed width should not be set on QFontComboBox itself, but on the popup. This regressed with commit bfb25c03523757d66974189e54dda97962206ef9, and caused assistants preferences dialog to become wider than the desktop. Change-Id: I2059794fc12d34837cdb7dfded80df57d102a6f0 Reviewed-by: Fabian Bumberger --- src/widgets/widgets/qfontcombobox.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/widgets/widgets/qfontcombobox.cpp') diff --git a/src/widgets/widgets/qfontcombobox.cpp b/src/widgets/widgets/qfontcombobox.cpp index 40ca73904c..db01543629 100644 --- a/src/widgets/widgets/qfontcombobox.cpp +++ b/src/widgets/widgets/qfontcombobox.cpp @@ -548,7 +548,7 @@ bool QFontComboBox::event(QEvent *e) if (e->type() == QEvent::Resize) { QListView *lview = qobject_cast(view()); if (lview) { - setFixedWidth(qMin(width() * 5 / 3, + lview->window()->setFixedWidth(qMin(width() * 5 / 3, QApplication::desktop()->availableGeometry(lview).width())); } } -- cgit v1.2.3