PDA

View Full Version : QDialog without Title Bar



Henry Blue Heeler
18th March 2015, 23:46
Any way to implement/derive a QDialog or QMainWindow without a title bar, i.e. no icon, no title, no [?] or [x].
I need the dialog to be resizable and movable by the user, so


setWindowFlags( Qt::FramelessWindowHint );
// or
setWindowFlags( Qt::SplashScreen );

don't do the trick.

Thx for any hints.

wysota
18th March 2015, 23:51
Set the frameless window hint and implement moving and resizing the dialog yourself.

Alundra
19th March 2015, 03:52
You can look at the code here, I didn't tried but surely can give hints on how do it :
http://qt-apps.org/content/show.php/Frameless+Window+Helper?content=138161
Or here for a more direct answer I think :
https://github.com/alexcastano/borderless-qt/blob/master/src/MainFrame.cpp

Henry Blue Heeler
2nd April 2015, 02:11
If anyone is paying attention, NcFramelessHelper worked great.
I didn't actually need a frame-less window, yet I got what I needed with:


mFh = new NcFramelessHelper;

mFh->setWidgetMovable( true );

mFh->setWidgetResizable( true );

mFh->activateOn( this );

setWindowFlags( Qt::CustomizeWindowHint ); // This along with NcFramelessHelper allows no title bar yet
// a dialog frame and the dialog is movable and resizable