PDA

View Full Version : QLineEdit focus problem



matteo.cozzaglio
14th July 2009, 09:56
Hi all,
I have a problem with the focus for the widget QLineEdit.
This is what append:
I have a QMainWindow that show a QDialog that contains the QLineEdit widget.
If I try to insert text i can not see any change on it, only when I pass the focus to an other control I can see what I have entered in the QLineEdit.
I think that is a problem on the focus. I have tried to change the focus policy of the QLineEdit but the result is the same.

This is the code that I use for show the QDialog


void show_ControlPanel()
{
frm_ControlPanel *ControlPanel;
ControlPanel = new frm_ControlPanel();
ControlPanel->setModal(true);
ControlPanel->show();
}

How can I do for solve this problem?
I use Qt Creator 1.2.0 on OSX

Thanks in advance

calhal
14th July 2009, 11:28
Could you provide a (small) compilable source code that reproduce the problem?

matteo.cozzaglio
14th July 2009, 13:26
Finally I think that I have find where is the problem.
In the QDialog there is a QListWidget, I have changed the focus Policy for this widget to "No focus" and I can edit the QlineEdit.

calhal
14th July 2009, 14:13
Next time give us a little bit more information, so we could help you. And please always use the code tags around your code.