Hi to all,
I would show a frameless dialog from my gui but I can't.
This is my code:
Qt Code:
  1. #ifndef __INFODLG_H__
  2. #define __INFODLG_H__
  3.  
  4. #include "GeneratedFiles/ui_infoDlg.h"
  5. #include <QDialog>
  6.  
  7. class MainWindow;
  8.  
  9. class InfoDlg : public QDialog
  10. {
  11.  
  12. public:
  13. InfoDlg( QWidget *parent );
  14. virtual ~InfoDlg();
  15.  
  16. private slots:
  17.  
  18. protected:
  19.  
  20. private:
  21. Ui::infoDlg ui;
  22. MainWindow* win;
  23. };
  24.  
  25. #endif __INFODLG_H__
To copy to clipboard, switch view to plain text mode 

and the *.cpp
Qt Code:
  1. #include "InfoDlg.h"
  2.  
  3. InfoDlg::InfoDlg( QWidget *parent )
  4. : QDialog(parent)
  5. {
  6. ui.setupUi(this);
  7. setWindowFlags( Qt::FramelessWindowHint );
  8. win = (MainWindow*)parent;
  9. }
  10.  
  11. InfoDlg::~InfoDlg()
  12. {
  13. }
To copy to clipboard, switch view to plain text mode 

here I create the dialog


Qt Code:
  1. void MainWindow::test()
  2. {
  3. InfoDlg dlg(this);
  4. dlg.exec();
  5. }
To copy to clipboard, switch view to plain text mode 

Unfortunately it doesn't work. I tried either with exec and show methods without success.

Where is the problem?

Regards