Important: Please read the Qt Code of Conduct -

Double window border

  • Hi..

    I am trying my one of first applications in qt. Everything seems to work fine;
    Except I get double border to the window. See the image..
    ! Bordered Image)!

    So if I fullscreen the window, inner border remains there giving it a bad look..

    So how do I remove inner border. I guess Qt adds it..

    Thanks in Advance

  • It is not iner border. It's a layout margins and you can remove them.
    How do you create form, by QtCreator designer?

  • No.. not using QtCreator.
    Here is the code for the main WIndow

    @#include <QtGui>

    #include "glwidget.h"
    #include "window.h"

    fullscreen = FALSE;
    glWidget = new GLWidget;

    QBoxLayout *mainLayout = new QBoxLayout((QBoxLayout::Direction)0, 0);
    mainLayout ->addWidget(glWidget);

    setWindowTitle(tr("Frame GL"));


    @qxoz - Can you show some code to remove layout margins?

  • Try this: setContentsMargins ( int left, int top, int right, int bottom )
    @mainLayout->setContentsMargins ( 0, 0, 0, 0);@

Log in to reply