Let the QCustomPlot widget have focus.

svn path=/trunk/; revision=51555
This commit is contained in:
Gerald Combs 2013-08-28 00:23:01 +00:00
parent 66b8223688
commit 25392c73f4
2 changed files with 5 additions and 0 deletions

View File

@ -90,6 +90,7 @@ TCPStreamDialog::TCPStreamDialog(QWidget *parent, capture_file *cf, tcp_graph_ty
data_range_.setBottom(seq_min - range_pad);
data_range_.setTop(seq_max + range_pad);
ui->streamPlot->yAxis->setRange(data_range_.bottom(), data_range_.top());
// XXX - QCustomPlot doesn't seem to draw any sort of focus indicator.
ui->streamPlot->setFocus();
}
@ -148,6 +149,7 @@ void TCPStreamDialog::keyPressEvent(QKeyEvent *event)
ui->streamPlot->yAxis->setRange(data_range_.bottom(), data_range_.top());
ui->streamPlot->replot();
break;
// Alas, there is no Blade Runner-style Qt::Key_Ehance
}
if (scale_range) {

View File

@ -22,6 +22,9 @@
<verstretch>1</verstretch>
</sizepolicy>
</property>
<property name="focusPolicy">
<enum>Qt::TabFocus</enum>
</property>
</widget>
</item>
<item>