From: Martin M. <mar...@gm...> - 2017-07-02 19:28:28
|
Hello, I tried to implement a function, that when you press any key the compsearch lineEdit will be focused, so you can easy search components, without clicking into the lineEdit. I have the problem, that there is no focus on the schematic and therefore I cannot get a keypress event. Do somebody know the focus is handled? What do you think about the feature? Best regards, Martin |
From: Andrés M. M. <and...@gm...> - 2017-07-18 17:53:44
|
Hello Martin, Sorry for the delay... You can set the focus by adding the following code in your slot function: TabView->setCurrentIndex(2);//Selects the component tab CompSearch->setFocus();//Sets the focus on the component search qlineedit I've just tried this code inside "void QucsApp::slotSetWire(bool on)". This way, if you press "CTRL+E" (draw wire), you set the focus on "CompSearch". Concerning shortcuts, this PR (https://github.com/Qucs/qucs/pull/558) is aimed to provide a shortcut manager which allows the user to set custom shortcuts. From my point of view, it would be a good idea if you could add your feature there. Kind regards, Andrés 2017-07-02 21:28 GMT+02:00 Martin Marmsoler <mar...@gm...>: > Hello, > > I tried to implement a function, that when you press any key the compsearch > lineEdit will be focused, so you can easy search components, without > clicking into the lineEdit. I have the problem, that there is no focus on > the schematic and therefore I cannot get a keypress event. > Do somebody know the focus is handled? > > What do you think about the feature? > > Best regards, > > Martin > ------------------------------------------------------------ > ------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Qucs-devel mailing list > Quc...@li... > https://lists.sourceforge.net/lists/listinfo/qucs-devel > -- Andrés Martínez Mera |