且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何设置QListWidgetItem的最小高度?

更新时间:2023-11-30 22:07:40

在项目上使用setSizeHint.

void QListWidgetItem::setSizeHint ( const QSize & size )

这是一种正确的方法,可以告诉委托人它必须为该项目保留多少屏幕.

This is the right method for telling the delegate how much screen it must preserve for the item.

查看 http://qt-project.org/doc/qt-4.8/qlistwidgetitem .html#setSizeHint