Bug 44340 - no completion available on KComboBox after setEditable(true)
Summary: no completion available on KComboBox after setEditable(true)
Status: RESOLVED WORKSFORME
Alias: None
Product: kdelibs
Classification: Frameworks and Libraries
Component: qt (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: kdelibs bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-06-25 19:03 UTC by ismore
Modified: 2008-02-15 04:24 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description ismore 2002-06-25 18:55:17 UTC
(*** This bug was imported into bugs.kde.org ***)

Package:           kdelibs
Version:           KDE 3.0.5 CVS/CVSup/Snapshot
Severity:          normal
Installed from:    Compiled sources
Compiler:          gcc 2.96
OS:                Linux
OS/Compiler notes: Not Specified

If I create a readonly KComboBox and afterwards call setEditable(true) (like what QDesigner does) it doesn't get completion.

From what it seems the problem is that QComboBox::setEditable calls setLineEdit with a "new QLineEdit" as argument not a KLineEdit. So the dynamic cast in KComboBox::setLineEdit fails and the signals doesn't get connected. 

I don't know if there is a easy fix for it but at least it should be documented.

(Submitted via bugs.kde.org)
Comment 1 John Firebaugh 2002-06-29 19:37:10 UTC
> If I create a readonly KComboBox and afterwards call setEditable(true)
> (like what QDesigner does) it doesn't get completion. 
>
> From what it seems the problem is that QComboBox::setEditable calls
> setLineEdit with a "new QLineEdit" as argument not a KLineEdit. So the
> dynamic cast in KComboBox::setLineEdit fails and the signals doesn't get
> connected. 
>
> I don't know if there is a easy fix for it but at least it should be
> documented.
 
Wow. How annoying. This is definitely a flaw in Qt as neither 
QComboBox::setEditable() and QComboBox::setUpLineEdit() are virtual. 
Basically there is no way to maintain control over the line edit when 
changing editability.

-John
Comment 2 George Goldberg 2007-12-18 05:22:20 UTC
Is this bug still present in a recent version of KDE, such as 3.5.8 or KDE 4 RC2?
Comment 3 George Goldberg 2008-02-15 04:24:59 UTC
Closing due to no response. Please reopen if this bug can be reproduced with KDE >= 4.0.1