|
From: Jérôme L. <lod...@us...> - 2014-06-24 10:04:23
|
Hi, I did not really follow what you want to achieve, but the error message tells that you have to specify on which widget you want to set the focus policy. If you want to set the policy of the QtGnuplotWidget containing the scene, you might try m_widget->setFocusPolicy( Qt::NoFocus); Jérôme Le 24/06/2014 11:32, Tatsuro MATSUOKA a écrit : > ----- Original Message ----- > >> From: sfeam >> To: gnuplot-beta Tatsuro MATSUOKA> >> Date: 2014/6/24, Tue 13:12 >> Subject: Re: How to get key information from qt terminal to gnuplot >> >> On Tuesday, 24 June 2014 12:15:07 PM Tatsuro MATSUOKA wrote: >> >>> > It partially work. Key input reflected in the plot window. >>> > However, <del>, <bs> and <esc> work but <tab> >> does not >>> > work. >> >> The <tab> key is not normally available to Qt apps, with some exceptions >> like text-entry widgets. It is trapped by the Qt top layer and normally >> interpreted as a request to switch focus to the next Qt widget. >> I suppose this made sense when Qt was mostly being >> used as a phone O/S but it's really annoying on the desktop. >> The closest I could find to a clue how to work around this was this >> thread: >> >> http://stackoverflow.com/questions/18160051/intercepting-tab-key-press-to-manage-focus-switching-manually >> >> I did not try to add this to gnuplot, however, so I don't >> know whether it would work for us or not. >> >> Ethan > > Thank you for the pointer. > > According to the first answer on the web page above, I added > > QWidget::setFocusPolicy( Qt::NoFocus); //trial > to the top of void QtGnuplotScene::keyPressEvent(QKeyEvent* event) > in QtGnuplotWidget.cpp. > > I have met the error: > > QtGnuplotScene.cpp:881:38: error: cannot call member function 'void QWidget::setFocusPolicy(Qt::FocusPolicy)' without object > > I do not have enough knowldege for C++ so that I cannot understand what the error message means. > I should make a mistake but I cannot find out what am I wrong. > > Sorry for my ignorance for this matter. > > Tatsuro > > ------------------------------------------------------------------------------ > Open source business process management suite built on Java and Eclipse > Turn processes into business applications with Bonita BPM Community Edition > Quickly connect people, data, and systems into organized workflows > Winner of BOSSIE, CODIE, OW2 and Gartner awards > http://p.sf.net/sfu/Bonitasoft > _______________________________________________ > gnuplot-beta mailing list > gnu...@li... > Membership management via: https://lists.sourceforge.net/lists/listinfo/gnuplot-beta > |