Results 1 to 20 of 20

Thread: problem in window to enter information

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Sep 2012
    Posts
    18
    Thanks
    4
    Qt products
    Qt4
    Platforms
    Windows

    Default problem in window to enter information

    Hi,
    i want when clic in button i see window where i enter name and number

    i make like that
    Qt Code:
    1. Add = new QToolButton(page_13);
    2. Add->setObjectName(QString::fromUtf8("Add"));
    3. Add->setGeometry(QRect(150, 9, 51, 31));
    4. Add->setText("Aadd");
    5. connect(Add, SIGNAL(clicked()),mQOgreWidget,SLOT(AddInfo()));
    To copy to clipboard, switch view to plain text mode 
    in AddInfo() i make like that
    Qt Code:
    1. QString Nom_Segment = QInputDialog::getText(this, "Name", "Name");
    2. int entier = QInputDialog::getInteger(this, "Number", "Number");
    To copy to clipboard, switch view to plain text mode 
    But like that i see one window where i enter just the name when i close it i see another one where i enter the number

    BUT it's not what i want i want to enter the a both in one window

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,017 Times in 4,793 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: problem in window to enter information

    Implement a dialog that will contain both fields.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. #3
    Join Date
    Sep 2012
    Posts
    18
    Thanks
    4
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: problem in window to enter information

    Implement a dialog that will contain both fields.
    how i do that ?

    did you mean that i define new widget with 2 QLineEdit,layout ?

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,017 Times in 4,793 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: problem in window to enter information

    Quote Originally Posted by robelle View Post
    how i do that ?
    A good place to start would be to do any tutorial on Qt that is based on QDialog.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. Replies: 6
    Last Post: 9th November 2011, 04:31
  2. Replies: 0
    Last Post: 20th October 2011, 18:27
  3. Replies: 0
    Last Post: 20th June 2011, 20:28
  4. Replies: 1
    Last Post: 14th September 2008, 23:05
  5. Tab/Enter focus problem
    By b1 in forum Qt Programming
    Replies: 4
    Last Post: 23rd October 2006, 23:34

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.