I have a few things for a QLineEdit's QCompleter I'm interested in customizing. I want to make it behave similar to the address / search bar in Chrome.
popup.width() - popup.viewport().width()
),
the width of the frame (2 * popup.frameWidth()
), and the width of the longest string (popup.fontMetrics().boundingRect(string).width()
).QRect
to
QCompleter.complete.Though I've never tried the Same The Documentation Clearly States to use maxVisibleItems(int maxItem)
to restrict number items visible.
and as with customization of the PopUp Window I thing You need to make a subclass of QAbstractItemView
and pass it on QCompleter::setPopup(QAbstractItemView * popup)
set setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With