Hello,
I have created two buttons:
layout->addWidget(cancelButton, 2, 0);
layout->addWidget(submitButton, 2, 1);
cancelButton = new QPushButton("Cancel");
layout->addWidget(cancelButton, 2, 0);
submitButton = new QPushButton("Submit");
layout->addWidget(submitButton, 2, 1);
To copy to clipboard, switch view to plain text mode
and connected them like this
connect(cancelButton, SIGNAL(clicked()), this, SLOT(cancel()));
connect(submitButton, SIGNAL(clicked()), this, SLOT(checkLogin()));
connect(cancelButton, SIGNAL(clicked()), this, SLOT(cancel()));
connect(submitButton, SIGNAL(clicked()), this, SLOT(checkLogin()));
To copy to clipboard, switch view to plain text mode
then, I specified some tabordering
setTabOrder(usernameLine, passwordLine);
setTabOrder(passwordLine, submitButton);
setTabOrder(submitButton, cancelButton);
setTabOrder(usernameLine, passwordLine);
setTabOrder(passwordLine, submitButton);
setTabOrder(submitButton, cancelButton);
To copy to clipboard, switch view to plain text mode
once the password is entered and I press tab, the submitButton is highlighted but pressing the return key on my mac does not trigger anything. If I click the button with the mouse, it works fine. I am using Qt 4.2.0-rc1.
Thanks for any help
Bookmarks