An idea flashed across her brain.
She had an idea that crossed her brain.