QLineEdit add QAction
Solved
General and Desktop
-
m_PasswordLineEdit = new KeyboardLineEdit(); m_ShowPwsAction = new QAction; m_ShowPwsAction->setCheckable(true); m_ShowPwsAction->setChecked(false); m_PasswordLineEdit->addAction(m_ShowPwsAction, QLineEdit::TrailingPosition);
I want add a button in the end of lineedit.
And I use add action. It's work.
But i clicked the button lineedit also got the focusIn.
It's possible action toggled but lineedit don't get the focusIn?Qt Version 5.9.5
-
I want press in red area still got focus on click, and click on blue area only got toggled (addAction) signal.I try set ClickFocus for lineEdit for focus policy, but it's also will get the focusIn. I think is not work.
thanks for your reply.