def METHOD_NAME(hidden_again, needs_recreate,
                               fake_inspector, inspector_widget, splitter,
                               qtbot):
    """Make sure we can still detach into a window after showing inline."""
    fake_inspector.set_position(inspector.Position.right)
    splitter.show()
    assert inspector_widget.isVisible()
    if hidden_again:
        fake_inspector.toggle()
        assert not inspector_widget.isVisible()
    if needs_recreate:
        fake_inspector.needs_recreate = True
        with qtbot.wait_signal(fake_inspector.recreate):
            fake_inspector.set_position(inspector.Position.window)
    else:
        with qtbot.assert_not_emitted(fake_inspector.recreate):
            fake_inspector.set_position(inspector.Position.window)
        assert fake_inspector.isVisible()
        assert fake_inspector.isWindow()