I take it you've seen Boost's circular buffer - hence why you asked about Qt specifically?