+
+ QAbstractItemView* aPopup = myCompleter->popup();
+ QFontMetrics aMetric = aPopup->fontMetrics();
+ int aWidth = 0;
+ QRect aRect;
+ foreach(QString aStr, theList) {
+ aRect = aMetric.boundingRect(aStr);
+ if (aRect.width() > aWidth)
+ aWidth = aRect.width();
+ }
+ aPopup->setMinimumWidth(aWidth + 25);