Results 1 to 3 of 3

Thread: Hide Title bar in Qt Quick Application

  1. #1
    Join Date
    Mar 2014
    Posts
    2
    Qt products
    Qt5
    Platforms
    Windows

    Default Hide Title bar in Qt Quick Application

    I need to hide the title bar of my application. I tried

    Qt Code:
    1. setWindowFlags(Qt::Window | Qt::FramelessWindowHint);
    To copy to clipboard, switch view to plain text mode 

    in main.cpp.. But i got the error "C:\Qt\Qt5.2.1\Tools\QtCreator\bin\PSC\main.cpp:13 : error: C2039: 'setWindowFlags' : is not a member of 'QtQuick2ApplicationViewer'"

  2. #2
    Join Date
    Mar 2014
    Posts
    4
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: Hide Title bar in Qt Quick Application

    Hi.
    Just add Qt::FramelessWindowHint to mainwindow.cpp
    Example:

    Qt Code:
    1. MainWindow::MainWindow(QWidget *parent) :
    2. QMainWindow(parent,Qt::FramelessWindowHint),
    3. ui(new Ui::MainWindow)
    4. {
    5. ui->setupUi(this);
    To copy to clipboard, switch view to plain text mode 

    that works for me without any problems.

    Greets
    xer

  3. #3
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Hide Title bar in Qt Quick Application

    Follow the class ancestor chain, check the documentation until you find the flags property.
    Bonus hint: QWindow

    Cheers,
    _

Similar Threads

  1. how to hide the title bar when a QDockWidget is docked?
    By oscar721 in forum Qt Programming
    Replies: 5
    Last Post: 23rd January 2014, 20:16
  2. Remove or hide title bar
    By tlerner in forum Qt Programming
    Replies: 3
    Last Post: 1st July 2013, 04:41
  3. Quick application (Qa)
    By tilsitt in forum Qt-based Software
    Replies: 1
    Last Post: 7th April 2011, 13:45
  4. Problem with building Qt quick application
    By Taspa in forum Qt Quick
    Replies: 2
    Last Post: 30th November 2010, 23:03

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.