All,

I have a QTextEdit box that is filled with text. I also have a button which clears the text when clicked.

How would I make it so a message box appears when the button is clicked that would display "Are you sure you want to clear the log?" With a OK or Cancel button under it?


Qt Code:
  1. void Autotester::clearlogs()
  2. {
  3. uip.AutoLog->clear();
  4.  
  5. }
To copy to clipboard, switch view to plain text mode 


Heres the connect for the button, the button that clears the text is named uip.autoClear.

Qt Code:
  1. connect( uip.autoClear, SIGNAL ( clicked() ), this, SLOT( clearlogs() )); //clears Autotester log when clicked
To copy to clipboard, switch view to plain text mode 

Thanks guys