Tab is likely being grabbed by the window itself (or maybe the
QKeySequenceEdit is ignoring) because it's using the tab as a switch to the
next thing in the tab order action.

On Fri, Jun 24, 2022 at 9:51 AM Laszlo Papp <lp...@kde.org> wrote:

> Hi,
>
> I am unable to assign tab to QKeySequenceEdit. Do you know what the issue
> may be?
>
> Is this a Qt bug or am I doing something wrong?
>
> You can find the small testbed code below that reproduces the issue.
>
> Working version: https://imgur.com/a/Mng0Rpv
> Non-working version: https://imgur.com/a/tSle7W9
>
> Thanks.
>
> Kind regards,
> László
>
> ---
>
> #include <QApplication>
> #include <QKeySequenceEdit>
> #include <QPushButton>
> #include <QVBoxLayout>
>
> int main(int argc, char *argv[])
> {
>   QApplication app(argc, argv);
>   QWidget mainWindow;
>
>   QVBoxLayout* layout = new QVBoxLayout;
>
>   // If I comment the button out, I can assign tab to keySequenceEdit
>   QPushButton *okButton = new QPushButton("Ok");
>   layout->addWidget(okButton);
>
>   QKeySequenceEdit* keySequenceEdit = new QKeySequenceEdit();
>   layout->addWidget(keySequenceEdit);
>
>   mainWindow.setLayout(layout);
>   mainWindow.show();
>   return app.exec();
> }
> _______________________________________________
> Development mailing list
> Development@qt-project.org
> https://lists.qt-project.org/listinfo/development
>
_______________________________________________
Development mailing list
Development@qt-project.org
https://lists.qt-project.org/listinfo/development

Reply via email to