Hi to all,
I would show a frameless dialog from my gui but I can't.
This is my code:
#ifndef __INFODLG_H__
#define __INFODLG_H__
#include "GeneratedFiles/ui_infoDlg.h"
#include <QDialog>
class MainWindow;
{
public:
virtual ~InfoDlg();
private slots:
protected:
private:
Ui::infoDlg ui;
MainWindow* win;
};
#endif __INFODLG_H__
#ifndef __INFODLG_H__
#define __INFODLG_H__
#include "GeneratedFiles/ui_infoDlg.h"
#include <QDialog>
class MainWindow;
class InfoDlg : public QDialog
{
public:
InfoDlg( QWidget *parent );
virtual ~InfoDlg();
private slots:
protected:
private:
Ui::infoDlg ui;
MainWindow* win;
};
#endif __INFODLG_H__
To copy to clipboard, switch view to plain text mode
and the *.cpp
#include "InfoDlg.h"
InfoDlg
::InfoDlg( QWidget *parent
){
ui.setupUi(this);
setWindowFlags( Qt::FramelessWindowHint );
win = (MainWindow*)parent;
}
InfoDlg::~InfoDlg()
{
}
#include "InfoDlg.h"
InfoDlg::InfoDlg( QWidget *parent )
: QDialog(parent)
{
ui.setupUi(this);
setWindowFlags( Qt::FramelessWindowHint );
win = (MainWindow*)parent;
}
InfoDlg::~InfoDlg()
{
}
To copy to clipboard, switch view to plain text mode
here I create the dialog
void MainWindow::test()
{
InfoDlg dlg(this);
dlg.exec();
}
void MainWindow::test()
{
InfoDlg dlg(this);
dlg.exec();
}
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
Bookmarks