Hi 
ok first of all, what kind of widget is your FramelessWidget? QWidget? QDialog? QObject?
when its from QDialog, then u dont need to set a parent in your constructor:
main.cpp:
...
FramelessWidget myWid(Qt::Dialog | Qt::FramelessWindowHint);
myWid.show();
main.cpp:
...
FramelessWidget myWid(Qt::Dialog | Qt::FramelessWindowHint);
myWid.show();
To copy to clipboard, switch view to plain text mode
but then u have to change your constructor in your framelesswidget.cpp to:
FramelessWidget
(...,
QWidget* parent
= 0);
FramelessWidget(..., QWidget* parent = 0);
To copy to clipboard, switch view to plain text mode
because arguments with default-values must be at last positions in the constructor.
if your FramelessWidget is inhertide from QWidegt, then u need a QDialog or QMainWindow like:
main.cpp:
{
...
mainWin.show();
FramelessWidget(&dia, Qt::Dialog | Qt::FramelessWindowHint);
dia.show();
return app.exec();
}
main.cpp:
{
...
QMainWindow mainWin;
mainWin.show();
QDialog dia;
FramelessWidget(&dia, Qt::Dialog | Qt::FramelessWindowHint);
dia.show();
return app.exec();
}
To copy to clipboard, switch view to plain text mode
this code snippet creates one MainWindow and one Dialog-Window.
i hope i could help you 
with best regards
nudels
Bookmarks