Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QLineEdit wont let me type anything in
Forum Updated to NodeBB v4.3 + New Features

QLineEdit wont let me type anything in

Scheduled Pinned Locked Moved General and Desktop
6 Posts 3 Posters 6.1k Views 1 Watching
  • 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 Offline
    F Offline
    firegod666
    wrote on last edited by
    #1

    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
    0
    • L Offline
      L Offline
      leon.anavi
      wrote on last edited by
      #2

      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
      0
      • F Offline
        F Offline
        firegod666
        wrote on last edited by
        #3

        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
        0
        • B Offline
          B Offline
          billconan
          wrote on last edited by
          #4

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

          1 Reply Last reply
          0
          • B Offline
            B Offline
            billconan
            wrote on last edited by
            #5

            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
            0
            • B Offline
              B Offline
              billconan
              wrote on last edited by
              #6

              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
              0

              • Login

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Users
              • Groups
              • Search
              • Get Qt Extensions
              • Unsolved