Like this:
QString selfilter = tr("JPEG (*.jpg *.jpeg)");
QString fileName = QFileDialog::getOpenFileName(
this,
title,
directory,
tr("All files (*.*);;JPEG (*.jpg *.jpeg);;TIFF (*.tif)" ),
&selfilter
);
The docs are a bit vague about this, so I found this out via guessing.