FET Forum

FET Development => Suggestions => Topic started by: Liviu Lalescu on January 17, 2012, 05:55:45 PM

Title: Adding auto-completion for combo boxes
Post by: Liviu Lalescu on January 17, 2012, 05:55:45 PM
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?)
Title: Re: Adding auto-completion for combo boxes
Post by: 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);
Title: Re: Adding auto-completion for combo boxes
Post by: Liviu Lalescu on January 18, 2012, 05:53:14 AM
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.
Title: Re: Adding auto-completion for combo boxes
Post by: 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.
Title: Re: Adding auto-completion for combo boxes
Post by: Liviu Lalescu on January 18, 2012, 04:40:11 PM
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.