Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    QLineEdit wont let me type anything in

    General and Desktop
    3
    6
    5339
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • F
      firegod666 last edited by

      Hi Guys, I'm very stuck and it was all going so well.
      I have a dialog box with a QLineEdit on it plus a pushbutton. If I press in the Qlineedit box it lets me type in ok,
      if I press the pushbutton, which brings up another info screen dialog box, which I then close to return to the first
      dialogbox. I can no longer type anything into the QLineEdit.
      i'm using the Latest Qt Creator and 4.7 libs

      All the other controls on the dialog continue to function fine but the QlineEdit seems to lock out input.
      Any ideas?

      1 Reply Last reply Reply Quote 0
      • L
        leon.anavi last edited by

        I would advise you to post sample code. It will clarify the situation and someone may give you a hint.

        Best regards,
        Leon

        http://anavi.org/

        1 Reply Last reply Reply Quote 0
        • F
          firegod666 last edited by

          ok here goes.

          @int main(int argc, char *argv[])
          {
          QApplication app(argc, argv);

          MainWindow mainWindow;
          mainWindow.setOrientation(MainWindow::ScreenOrientationLockPortrait);
          mainWindow.showFullScreen();

          return app.exec();
          }

          MainWindow::MainWindow(QWidget *parent): QMainWindow(parent), ui(new Ui::MainWindow), deviceInfo(NULL)
          {
          ui->setupUi(this);
          ui->progressBar->setValue(0);
          ui->progressBar->setTextVisible(false);
          connect(ui->IDC_CheckThingy, SIGNAL(clicked()),this, SLOT(FindThingy()));
          connect(ui->IDC_Info, SIGNAL(clicked()),this, SLOT(ShowInfo()));
          }@

          This brings up the main dialog, which contains the QLineEdit and you can enter text on te mobile phone
          fine.
          BUT when FindThingy is called by clicking on the button it does this:

          @ NoMatch nomatch_page;
          nomatch_page.showFullScreen();
          nomatch_page.exec();@

          where

          @NoMatch::NoMatch(QWidget *parent) :
          QDialog(parent),
          ui(new Ui::NoMatch)
          {
          ui->setupUi(this);

          }

          NoMatch::~NoMatch()
          {
          delete ui;
          }@

          This second dialog just has a close button on it and when clicked returns from the exec
          back to the first dialog. Now you can't enter text.

          1 Reply Last reply Reply Quote 0
          • B
            billconan last edited by

            I seem to have the same issue.
            Have you solved this?

            1 Reply Last reply Reply Quote 0
            • B
              billconan last edited by

              I found this:

              http://stackoverflow.com/questions/7136760/qt-qdialog-issue-qlineedit-will-not-take-input

              not sure if it's related to qdialog.

              1 Reply Last reply Reply Quote 0
              • B
                billconan last edited by

                I found a solution to my case. I posted here:

                http://stackoverflow.com/questions/2180070/qdialog-doesnt-accept-text-input-if-modal/14077048#14077048

                1 Reply Last reply Reply Quote 0
                • First post
                  Last post