Qwidget as modal
-
Hi
I have a Qwidget window which i m displaying on click of button.
I want to make this QWidget window as modal how to do this.Below is my piece of code which gets called when i click button.
@ Myobj *obj1 = new Myobj();
obj1->show();@Myobj class
@class Myobj: public QWidget
{
Q_OBJECTpublic:
Myobj(QWidget *parent = 0);
~Myobj();
Ui::Myobj ui;
public slots:
void OnBrowseOneFile();
void OnImportOneFile();
private:
};@ -
Using:
@
setWindowModality(Qt::WindowModal);
@in MyObj's constructor does not work?