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. [Solved] QMessageBox with line edit

[Solved] QMessageBox with line edit

Scheduled Pinned Locked Moved General and Desktop
5 Posts 2 Posters 12.5k Views
  • 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 Offline
    K Offline
    kbt90
    wrote on last edited by
    #1

    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
    0
    • EddyE Offline
      EddyE Offline
      Eddy
      wrote on last edited by
      #2

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

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

        1 Reply Last reply
        0
        • EddyE Offline
          EddyE Offline
          Eddy
          wrote on last edited by
          #4

          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
          0
          • K Offline
            K Offline
            kbt90
            wrote on last edited by
            #5

            Super, thanks!

            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