Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
自動更新でQTreeViewを変更しようとしていますが、このコードでパスを設定できます
tree->setCurrentIndex(fsModel->index(QDir::currentPath())); // or any path##見出し##このリンクから取得
tree->setCurrentIndex(fsModel->index(QDir::currentPath())); // or any path
しかし、私の質問は、CurrentIndexがフォルダーに対して変更された後、どのように展開できるかということです。
もう一度無視してくださいtree->setExpanded(fsModel-> index(QDir :: currentPath())); それをします。