I'll post this in newbie section myself 
I inherit from a class that inherits from QMainWindow
this class calls upon the constructor of QMainWindow, now there is 1 thing I need to change to the flags of the mainwindow so I call the constructor of my upperclass
and afterwards I set the flags with setWFlags but it doesn't seem to do anything
This is the super class constructor which I call
//-----------------------------------------------------------------------------
vgui_qt_window::vgui_qt_window(int w, int h, const char* title)
Qt::WStyle_Customize | Qt::WDestructiveClose |
Qt::WStyle_NormalBorder | Qt::WStyle_SysMenu |
Qt::WStyle_MinMax),
statusbar (this),
use_menubar(false),
use_statusbar(true)
{
setup_widget(w, h, title);
}
//-----------------------------------------------------------------------------
vgui_qt_window::vgui_qt_window(int w, int h, const char* title)
: QMainWindow(0, "vgui_qt_mainwindow_without_menu",
Qt::WStyle_Customize | Qt::WDestructiveClose |
Qt::WStyle_NormalBorder | Qt::WStyle_SysMenu |
Qt::WStyle_MinMax),
statusbar (this),
use_menubar(false),
use_statusbar(true)
{
setup_widget(w, h, title);
}
To copy to clipboard, switch view to plain text mode
This is my constructor
Tgui_qt_window::Tgui_qt_window(int w, int h, const char* title, bool alwaysOnTop)
: vgui_qt_window(w,h,title)
{
this->setWFlags(Qt::WStyle_Customize | Qt::WDestructiveClose |
Qt::WStyle_NormalBorder | Qt::WStyle_SysMenu |
Qt::WStyle_MinMax | QT::WStyle_StaysOnTop);
}
Tgui_qt_window::Tgui_qt_window(int w, int h, const char* title, bool alwaysOnTop)
: vgui_qt_window(w,h,title)
{
this->setWFlags(Qt::WStyle_Customize | Qt::WDestructiveClose |
Qt::WStyle_NormalBorder | Qt::WStyle_SysMenu |
Qt::WStyle_MinMax | QT::WStyle_StaysOnTop);
}
To copy to clipboard, switch view to plain text mode
Bookmarks