QLineEdit is not editable - error



  • I want to use a QLineEdit in order to input some text from the user, in an application designed for symbian. I am currently using a part of the Maps Demo example found in Qt Mobility, from the Qt Creator. I use a layout on top of the view on which the map is placed to display the QLineEdit. The problem is that I cannot input any text from the simulator. I have checked and the QLineEdit variable isn't readOnly. What could be the problem?
    Thank you.



  • Can not identify what was happened. Does your QLineEdit have focus? You can try set placeHolder text first, and see when you pressed your lineEdit widget, if there has focus or cursor.



  • I can click on in and select the default text set previous, if that is what you mean.

    Funny thing, is that i tried the same thing in a very simplified scenario: a map, loaded onto a scene, loaded onto a QGraphicsView and in the layout of the QGraphicsView the QLineEdit. The QLineEdit could be modified in this case. Somewhere something is wrong.



  • [quote author="Chuck Gao" date="1311239823"]Can not identify what was happened. Does your QLineEdit have focus? You can try set placeHolder text first, and see when you pressed your lineEdit widget, if there has focus or cursor.[/quote]

    There is no focus or cursor ...



  • I have even tried to set focus manually .... but nothing:

    @
    void MapsWidget::showEvent(QShowEvent* e){
    this->activateWindow();
    this->userAnswer->setFocus();
    QWidget::showEvent(e);
    }@



  • I had along with the QLineEdit a QLabel and a QPushButton. When I added all of them on the layout, i should not specify label.setVisible(true), and pushButton.setVisible(true). This was the problem


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.