I have 1 instance of Qt Creator open with 2 floating windows (Open in New Window). This gives me a total of 3 "editor windows". Each "editor window" has 3 horizontal splits, giving me +-9 open documents. I have this spread over 3 monitors like this.




I usually hibernate my workstation but if I have a crash and have to reboot or I open the project on a different machine I lose the floating windows and the documents in their splits and the position of the scroll in those documents and I have to manually start over rearranging everything. I'm looking to save and recall this data on project load.


To fix this, I've been building Qt Creator from source. My first task is to move the initial (or floating) window. I've tracked down some stuff but I can't find the "parent widget" of the EditorManager which is the "editor manager" alluded to above. Thus, just the editor managers move, which obviously I don't want. How do I access and move the initial parent window and the floating windows?

Qt Code:
  1. //editormanager.cpp
  2.  
  3. void EditorManagerPrivate::restoreFloatingWindows()
  4. {
  5. for (int i = 0; i < d->m_editorAreas.size(); ++i)
  6. {
  7. d->m_editorAreas[i]->move(100, 100); // don't want to move this
  8. d->m_editorAreas[i]->parentWidget()->move(100, 100); //no effect
  9.  
  10. qDebug() << "pos" << d->m_editorAreas[i]->pos();
  11. qDebug() << "pos parentWidget" << d->m_editorAreas[i]->parentWidget()->pos();
  12. }
  13. }
To copy to clipboard, switch view to plain text mode