[Interest] QTreeView, QHeaderview, ResizeToContents and Interactive

Alexander Semke alexander.semke at web.de
Tue Mar 21 22:00:57 CET 2017


On Sonntag, 19. März 2017 13:09:55 CET Alexander Semke wrote:
> [...]
> What is being delayed here? I'm not quite comfortable with the fixed timer
> value and it doesn't work on my notebook for 0. Whatever is queued for
> processing here, how to wait until it's completely done?
> 
> void ProjectExplorer::setModel(AspectTreeModel* treeModel) {
> 	m_treeView->setModel(treeModel);
> 	//TODO: wait...
> 	m_treeView->header()->resizeSections(QHeaderView::ResizeToContents);
> }

Argh... My fault. The model is empty (no content yet) when this function is 
called. I rewrote the code to call this resizeSections function only when the 
project is loaded (=model has content). All good now.


-- 
Alexander





More information about the Interest mailing list