[Qt-interest] Modifying QListWidget scrolling behaviour ?

Andreas Diehl Andreas_Diehl at abs.org
Fri May 15 08:21:52 CEST 2009


Hi.
There are three methods that should help you:
    QListWidget::scrollToBottom()
    QListWidget::scrollToItem( ... )
    QListWidget::scrollToTop()

I guess adding items puts them to the end, thus scrollToBottom after
adding should solve your problem.

Regards,
	Andreas


________________________________

	Von: qt-interest-bounces at trolltech.com
[mailto:qt-interest-bounces at trolltech.com] Im Auftrag von Stephen
Collyer
	Gesendet: Donnerstag, 14. Mai 2009 20:27
	An: qtInterest
	Betreff: [Qt-interest] Modifying QListWidget scrolling behaviour
?
	
	
	I have a QListWidget to which I'm adding items using addItem();
	I would like to ensure that the widget scrolls automatically to
ensure that
	the last added item is always visible by default. 
	
	Is it possible to do this ?
	
	-- 
	Stephen Collyer
--
Mit freundlichen Gru?en
Andreas Diehl 
 
-------------------------- ABS -------------------------
ABS Systemberatung OHG          Tel: +49 (0)7053/9290-03
Hauffstr. 9                     Fax: +49 (0)7053/9290-
D-75385 Bad Teinach-Zavelstein        http://www.abs.org
Registergericht Calw HRA 1031
[mailto:Andreas_Diehl at abs.org]
 
----- Loesungen fuer den Maschinen- und Anlagenbau -----



More information about the Qt-interest-old mailing list