Getting rid of Dialog Title Bar
I have several different dialog forms in my application. I want to display them without the title bar. It is a touchscreen interface and the title bar and control box just get in the way. I can get rid of the title bar in the designer of Qt Creator, but when the form previews, or displays in the app, Qt puts the title bar back again, with a title of "Dialog". My main window displays without a title bar, no problem. I've scoured the help docs and Googled until my eyes bleed but I can't figure out how to do this. Help, please?
Re: Getting rid of Dialog Title Bar
How about using QWidget::setWindowFlags(Qt::WindowFlags) ?
In your custom dialog constructor, add this code:
Code:
setWindowFlags(Qt::Dialog | Qt::FramelessWindowHint);
Re: Getting rid of Dialog Title Bar
That did the trick. Thank you. You are too cool.