Use QListWidget in Qt preferences dialog, so that keyboard navigation can be used.

This commit is contained in:
craig.p.drummond
2013-08-29 18:25:04 +00:00
committed by craig.p.drummond
parent 49eca75e8a
commit fd0ef3ecbc
4 changed files with 264 additions and 19 deletions

View File

@@ -112,17 +112,15 @@ PreferencesDialog::PreferencesDialog(QWidget *parent)
shortcuts->view()->setItemDelegate(new BasicItemDelegate(shortcuts->view()));
#endif
widget->addPage(cache, i18n("Cache"), Icon("folder"), i18n("Cached Items"));
// widget->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Minimum);
widget->allPagesAdded();
#ifndef ENABLE_KDE_SUPPORT
int h=(widget->minimumHeight()/widget->count())*(qMax(widget->count(), 10)+0.5);
setMinimumHeight(h);
setMinimumWidth(h*1.333);
#endif
setCaption(i18n("Configure"));
setMainWidget(widget);
setAttribute(Qt::WA_DeleteOnClose);
connect(files, SIGNAL(reloadStreams()), SIGNAL(reloadStreams()));
#ifndef ENABLE_KDE_SUPPORT
int h=sizeHint().height();
setMinimumHeight(h);
setMinimumWidth(h*1.333);
#endif
setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum);
}