Results 1 to 3 of 3

Thread: Re: Help on QMessageBox

  1. #1
    Join Date
    Jun 2006
    Location
    San Diego, USA
    Posts
    95
    Thanks
    9
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: Help on QMessageBox

    Hi All,

    I have a UI form which has some pushbuttons, clicking on one of the button it has to popup a message which was implemented by QMessageBox.
    I created QMessageBox as question which has "Yes" "No" as buttons.
    When I click on "Yes" it has to open a new window/form which will have 10-12 labels and lineedits to display some values in it.

    How to implement the connection between QMessage Yes button to a form which has Labels and Lineedits, or is there any better way to implement for opening a new window when clicking on Yes button for QMessageBox.

    Thanks & Regards,
    Arun.

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

    Default Re: Help on QMessageBox

    The message box will return the button that was clicked. Based on that you can perform some changes to the widget. Something like that:
    Qt Code:
    1. if(QMessageBox::question(....) == QMessageBox::Yes){
    2. myWidget->doSomething();
    3. }
    To copy to clipboard, switch view to plain text mode 

  3. The following user says thank you to wysota for this useful post:

    arunvv (25th March 2008)

  4. #3
    Join Date
    Jun 2006
    Location
    San Diego, USA
    Posts
    95
    Thanks
    9
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: Help on QMessageBox

    Thanks wysota,

    That helped thanks for your reply.

Similar Threads

  1. QMessageBox Size
    By locus in forum Qt Programming
    Replies: 2
    Last Post: 20th July 2011, 13:35
  2. QMessageBox problem in Qtopia
    By jogeshwarakundi in forum Qt for Embedded and Mobile
    Replies: 5
    Last Post: 8th February 2008, 09:22
  3. QMessageBox - no dialog title on Mac OS?
    By will49 in forum Qt Programming
    Replies: 1
    Last Post: 8th October 2007, 14:07
  4. customize the Icon QMessageBox
    By QiT in forum Newbie
    Replies: 1
    Last Post: 26th August 2006, 10:40
  5. get button on QMessageBox
    By manhds in forum Qt Programming
    Replies: 3
    Last Post: 27th June 2006, 04:38

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.