Plasma::ComboBox - not possible to set line edit and keep theming?

Marco Martin notmart at gmail.com
Tue Apr 7 15:52:39 CEST 2009


On Tuesday 07 April 2009, Emdek wrote:
> Hello
>
> I have question, is it possible to set line edit for Plasma themed combo
> box and not loose it's theme?
comboBox->nativeWidget()->setEditable(true) should work
changing its lineedit not, becausethe new lineedit won't have the plasma 
private style

> I was trying to use this code:
>
> 	Plasma::ComboBox *comboBox = new Plasma::ComboBox(this);
>
> 	KLineEdit *lineEdit = new KLineEdit(comboBox->nativeWidget());
> 	lineEdit->setAttribute(Qt::WA_NoSystemBackground);
>
> 	comboBox->nativeWidget()->setLineEdit(lineEdit);
>
> But then that combo box looks like normal widget, without Plasma theming...
>
> Any suggestions?
>
>
> Best regards
> Michał
>
>
> _______________________________________________
> Plasma-devel mailing list
> Plasma-devel at kde.org
> https://mail.kde.org/mailman/listinfo/plasma-devel




More information about the Plasma-devel mailing list