2012-07-03 24 views

回答

0

創建一個派生自QHeaderView的類,並提供您自己的實現sizeHint以返回您想要的正確高度。即

QSize MyCustomHeaderView::sizeHint() const 
{ 
    // Get the base implementation size. 
    QSize baseSize = QHeaderView::sizeHint(); 

    // Override the height with a custom value. 
    baseSize.setHeight(25); 

    return baseSize; 
}