Tab order
-
Open target ui in Qt Designer
Edit / Edit Tab Order
works for me
There are lots of useful settings as wellBut how to adjust it using Qt Libs?
Tried manipulate already created lineEdits, but could notit does the trick but it tabs with freshly created lineEdits
Obj* obj =new Obj);
``` obj->setWindowFlag(Qt::WindowStaysOnTopHint); obj->setGeometry(1393, 437, 500, 200); // Adjust the geometry as needed obj->setWindowTitle("obj"); Create line edits QLineEdit *lineEdit2 = new QLineEdit(obj); QLineEdit *lineEdit3 = new QLineEdit(obj); QLineEdit *lineEdit4 = new QLineEdit(obj); QLineEdit *lineEdit5 = new QLineEdit(obj); QLineEdit *lineEdit2Again = new QLineEdit(obj) // Add widgets to the layout QVBoxLayout *layout = new QVBoxLayout(obj); layout->addWidget(lineEdit2); layout->addWidget(lineEdit3); layout->addWidget(lineEdit4); layout->addWidget(lineEdit5); layout->addWidget(lineEdit2Again); -
Open target ui in Qt Designer
Edit / Edit Tab Order
works for me
There are lots of useful settings as wellBut how to adjust it using Qt Libs?
Tried manipulate already created lineEdits, but could notit does the trick but it tabs with freshly created lineEdits
Obj* obj =new Obj);
``` obj->setWindowFlag(Qt::WindowStaysOnTopHint); obj->setGeometry(1393, 437, 500, 200); // Adjust the geometry as needed obj->setWindowTitle("obj"); Create line edits QLineEdit *lineEdit2 = new QLineEdit(obj); QLineEdit *lineEdit3 = new QLineEdit(obj); QLineEdit *lineEdit4 = new QLineEdit(obj); QLineEdit *lineEdit5 = new QLineEdit(obj); QLineEdit *lineEdit2Again = new QLineEdit(obj) // Add widgets to the layout QVBoxLayout *layout = new QVBoxLayout(obj); layout->addWidget(lineEdit2); layout->addWidget(lineEdit3); layout->addWidget(lineEdit4); layout->addWidget(lineEdit5); layout->addWidget(lineEdit2Again);@JacobNovitsky
is it possible to move between buttons and lineEdit using arrows? -
Open target ui in Qt Designer
Edit / Edit Tab Order
works for me
There are lots of useful settings as wellBut how to adjust it using Qt Libs?
Tried manipulate already created lineEdits, but could notit does the trick but it tabs with freshly created lineEdits
Obj* obj =new Obj);
``` obj->setWindowFlag(Qt::WindowStaysOnTopHint); obj->setGeometry(1393, 437, 500, 200); // Adjust the geometry as needed obj->setWindowTitle("obj"); Create line edits QLineEdit *lineEdit2 = new QLineEdit(obj); QLineEdit *lineEdit3 = new QLineEdit(obj); QLineEdit *lineEdit4 = new QLineEdit(obj); QLineEdit *lineEdit5 = new QLineEdit(obj); QLineEdit *lineEdit2Again = new QLineEdit(obj) // Add widgets to the layout QVBoxLayout *layout = new QVBoxLayout(obj); layout->addWidget(lineEdit2); layout->addWidget(lineEdit3); layout->addWidget(lineEdit4); layout->addWidget(lineEdit5); layout->addWidget(lineEdit2Again);@JacobNovitsky
Not sure what your question about tabbing is, you can do whatever whether you do it in Designer or in code.Don't forget: the only thing saved from Designer is the
.uifile. So anything/everything you do there must be in that file. And then you runuicto read that and produce file namedui_....h. (This is put in the build output directory, not the source directory. If you are Python it's a.pyfile.) And these are included/imported into your code file, you can examine them in editor and see what code it produces for your.uisettings. That can be really useful for understanding how to do things in code which you did in Designer. The tab stuff would be in this.I don't know about your arrow keys. You would normally use Tab or Shift+Tab. In any case, the interface for moving around should follow the desktop window manager's way of doing things (which Qt will do), rather than inventing your own non-standard way, which would just confuse users.
-
@JacobNovitsky
is it possible to move between buttons and lineEdit using arrows?@JacobNovitsky said in Tab order:
is it possible to move between buttons and lineEdit using arrows?
In the case at hand:
Arrows/No.
Tabs/Yes.Arrows will navigate between widgets as long as they don't have input focus. Once the cursor is stuck in a line edit, only tab will move it. You can subclass
QLineEditto implement arrow based focus changes. -
Open target ui in Qt Designer
Edit / Edit Tab Order
works for me
There are lots of useful settings as wellBut how to adjust it using Qt Libs?
Tried manipulate already created lineEdits, but could notit does the trick but it tabs with freshly created lineEdits
Obj* obj =new Obj);
``` obj->setWindowFlag(Qt::WindowStaysOnTopHint); obj->setGeometry(1393, 437, 500, 200); // Adjust the geometry as needed obj->setWindowTitle("obj"); Create line edits QLineEdit *lineEdit2 = new QLineEdit(obj); QLineEdit *lineEdit3 = new QLineEdit(obj); QLineEdit *lineEdit4 = new QLineEdit(obj); QLineEdit *lineEdit5 = new QLineEdit(obj); QLineEdit *lineEdit2Again = new QLineEdit(obj) // Add widgets to the layout QVBoxLayout *layout = new QVBoxLayout(obj); layout->addWidget(lineEdit2); layout->addWidget(lineEdit3); layout->addWidget(lineEdit4); layout->addWidget(lineEdit5); layout->addWidget(lineEdit2Again);