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. How to hide ubuntu title bar while opening new window on top of main window
Forum Updated to NodeBB v4.3 + New Features

How to hide ubuntu title bar while opening new window on top of main window

Scheduled Pinned Locked Moved Solved General and Desktop
6 Posts 2 Posters 2.6k 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.
  • G Offline
    G Offline
    guru007
    wrote on last edited by guru007
    #1

    I am building an app in which application window should be always fullscreen.Main window is fullscreen with no problem.But when I open a new window inside constructor of main window it shows top bar of Ubuntu which contain battery,wifi information etc.
    My Question is how to get rid of that title bar while popping up new QWidget.
    Here is link to screenshot:
    http://ibin.co/2S3nRGxEezwz
    This is code snippet:
    mpd.cpp // mainwindow class
    #include "mpd.h"
    #include "ui_mpd.h"
    #include "header.h"
    mpd::mpd(QWidget *parent) :
    QMainWindow(parent),
    ui(new Ui::mpd)
    {
    ui->setupUi(this);
    select_route = new route_selection;
    select_route->setWindowFlags(Qt::Widget | Qt::FramelessWindowHint);
    select_route->show();
    }

    mpd::~mpd()
    {
    delete ui;
    }
    route_selection::route_selection(QWidget *parent) :
    QWidget(parent),
    ui(new Ui::route_selection)
    {
    ui->setupUi(this);
    train_selection_keyboard = new keyboard(this);
    ui->stackedWidget->addWidget(train_selection_keyboard);
    ui->stackedWidget->setCurrentWidget(train_selection_keyboard);
    this->setGeometry(100,200,this->width(),this->height());
    this->setWindowFlags(Qt::FramelessWindowHint);

    1 Reply Last reply
    0
    • mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on last edited by
      #2

      hi
      if you give full screen as parent , does it still do this ?
      select_route = new route_selection;
      -->
      select_route = new route_selection(this);

      1 Reply Last reply
      0
      • G Offline
        G Offline
        guru007
        wrote on last edited by
        #3

        I changed
        select_route = new route_selection(this);
        but still showing same behaviour.

        mrjjM 1 Reply Last reply
        0
        • G guru007

          I changed
          select_route = new route_selection(this);
          but still showing same behaviour.

          mrjjM Offline
          mrjjM Offline
          mrjj
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @guru007
          could you also try
          route_selection->setWindowFlags(Qt::WindowStaysOnTopHint);
          (for test)

          1 Reply Last reply
          0
          • G Offline
            G Offline
            guru007
            wrote on last edited by
            #5

            Thanks @mrjj My problem is solved with setWindowFlags(Qt::WindowStaysOnTopHint);

            mrjjM 1 Reply Last reply
            1
            • G guru007

              Thanks @mrjj My problem is solved with setWindowFlags(Qt::WindowStaysOnTopHint);

              mrjjM Offline
              mrjjM Offline
              mrjj
              Lifetime Qt Champion
              wrote on last edited by
              #6

              @guru007
              ok super so that keeps ubuntu from re-showing the status bar.
              Happy coding.

              1 Reply Last reply
              1

              • Login

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