Hello and thanks for the response.

I have a heavily styled widget with rounded borders and padding. The vertical header text is added automatically by when I insert a new row. These are numbers starting from 1.

The single digit numbers cannot be seen. The header resizes if there is more then 9 rows - double digit header text -, which makes the single digit number visible and part of the second digit of the double digit ones. It works fine without styling.

I use this code to insert the rows:

Qt Code:
  1. QStandardItemModel * model =( ( QStandardItemModel * ) ( this->model() ) ); model->insertRows ( 0, 1 );
  2.  
  3. QBrush brush=QBrush(color);
  4. AddTextItem ( displayqueue_item.item1, ITEM1, 0, brush );
  5. AddPixmapItem ( "", displayqueue_item.item2, ITEM2, 0, brush );
To copy to clipboard, switch view to plain text mode 

As a workaround, I added an extra space to every header text after calling insertRow().

Qt Code:
  1. for( int i=model->rowCount(); i>0; --i)
  2. model->setHeaderData(i-1, Qt::Vertical, QString("%1 ").arg(i));
To copy to clipboard, switch view to plain text mode 

This is now looks right until the style is changed again. Is this a bug in the QT resizing algorithm?