Qt Forum

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

    [Solved] QMessageBox with line edit

    General and Desktop
    2
    5
    11389
    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.
    • K
      kbt90 last edited by

      Hello -

      I am trying to create the effect of a QMessageBox with a line edit.

      When a user clicks a button, the dialog should pop up over the main dialog for the user to input in the line edit, and once they press okay, the dialog goes away. I would like the main dialog to then be able to get the value from the line edit, without having to first store it off in settings in the dialog and retrieve it from settings in the main window.

      How can I go about doing this?

      Thanks,
      Kate

      1 Reply Last reply Reply Quote 0
      • E
        Eddy last edited by

        Hi Kate,

        Why do you want to use a QMessagebox instead of a dialogbox you created yourself?

        Qt Certified Specialist
        www.edalsolutions.be

        1 Reply Last reply Reply Quote 0
        • K
          kbt90 last edited by

          Well I don't want to use a QMessageBox, I just want similar behavior in the dialog.

          1 Reply Last reply Reply Quote 0
          • E
            Eddy last edited by

            Ok, in that case have a look at "QInputDialog":http://developer.qt.nokia.com/doc/qt-4.7/qinputdialog.html
            This way you don't have to make your own dialog.

            EDIT : there is a nice example in how to use it too.

            Qt Certified Specialist
            www.edalsolutions.be

            1 Reply Last reply Reply Quote 0
            • K
              kbt90 last edited by

              Super, thanks!

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