Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Double window border
Forum Updated to NodeBB v4.3 + New Features

Double window border

Scheduled Pinned Locked Moved General and Desktop
4 Posts 2 Posters 1.5k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Andrew
    wrote on last edited by
    #1

    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

    1 Reply Last reply
    0
    • Q Offline
      Q Offline
      qxoz
      wrote on last edited by
      #2

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

      1 Reply Last reply
      0
      • A Offline
        A Offline
        Andrew
        wrote on last edited by
        #3

        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?

        1 Reply Last reply
        0
        • Q Offline
          Q Offline
          qxoz
          wrote on last edited by
          #4

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

          1 Reply Last reply
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved