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..
    !http://s11.postimage.org/kk17hcuzn/double_Border.jpg(Double 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
    Andrew



  • 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"

    Window::Window()
    {
    fullscreen = FALSE;
    glWidget = new GLWidget;

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

    setLayout(mainLayout);
    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
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.