Hi,

I have written the following code in the constructor of class that reimplements QWidget

Qt Code:
  1. setAttribute(Qt::WA_DeleteOnClose);
  2. setWindowModality(Qt::WindowModal);
  3. setFixedSize(400,120);
  4. setAutoFillBackground(true);
  5.  
  6. registerButton = new QPushButton(tr("Enter registraion key"),this);
To copy to clipboard, switch view to plain text mode 

I am trying to get a modal widget (frameless) on top of my mainwindow. Parent of this widget is the mainwindow of the application. But the registerButton is disabled because of setWindowModal.

Anyideas on why the button is disabled and how can I prevent it from getting disabled ?

Thanks a lot