Adding auto-completion for combo boxes

Started by Liviu Lalescu, January 17, 2012, 05:55:45 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Liviu Lalescu

I received by email a suggestion from a user, and I added it in the TODO:

---
From murad:

Create please, in QComboBox, auto-complete. With a large number of students and teachers it is very difficult to find the necessary students or teachers.
---

Maybe programmers can suggest a solution in Qt, I do not know a good one. (Currently, the combo boxes are read only. QComboBox requires to be read/write to have auto-completion, but if I make them read/write then the user might want to type a nonexistent name - what to do in this case?)

Silver

Dear Liviu
if you add combo, this code for rtl language.

    if (layoutDirection() == Qt::LeftToRight)
        qApp->setLayoutDirection(Qt::RightToLeft);
    else
        qApp->setLayoutDirection(Qt::LeftToRight);

Liviu Lalescu

Quote from: Silver on January 17, 2012, 10:31:46 PM
Dear Liviu
if you add combo, this code for rtl language.

    if (layoutDirection() == Qt::LeftToRight)
        qApp->setLayoutDirection(Qt::RightToLeft);
    else
        qApp->setLayoutDirection(Qt::LeftToRight);


I am sorry, but I do not understand what you suggest. The combo boxes in Arabic language are right-to-left, and so is the whole application.

Silver

I am not a programmer.
And I want to help you, so I looked for "QComboBox" in Arabic forums and found this information may be helpful, I do not know.
I apologize if the information stupid  :P.

Liviu Lalescu

Quote from: Silver on January 18, 2012, 04:03:28 PM
I am not a programmer.
And I want to help you, so I looked for "QComboBox" in Arabic forums and found this information may be helpful, I do not know.
I apologize if the information stupid  :P.

No problem :-)

The request is for auto-completion, like you have 100 entries in the combo box: "abc123", "abd123",... , "xyz4", and you want to type "abd" and current item goes to the second entry.