Results 1 to 5 of 5

Thread: how to add ad banner instead of title bar??

  1. #1
    Join Date
    Feb 2011
    Posts
    23
    Qt products
    Qt4
    Platforms
    Symbian S60 Maemo/MeeGo

    Default how to add ad banner instead of title bar??

    Hi,
    i want to make a full screen app window(without titlebar & commands bar)
    and set an image as ad banner in the top of the window
    how to do that

    thanks
    Ram

  2. #2
    Join Date
    Jan 2009
    Location
    The Netherlands and Spain
    Posts
    150
    Thanks
    6
    Thanked 18 Times in 18 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: how to add ad banner instead of title bar??

    Start reading about Window Flags:
    http://doc.qt.nokia.com/4.6/widgets-windowflags.html

  3. #3
    Join Date
    Aug 2009
    Location
    coimbatore,India
    Posts
    314
    Thanks
    37
    Thanked 47 Times in 43 Posts
    Qt products
    Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: how to add ad banner instead of title bar??

    hi ram,
    you can use setWindowFlags(Qt::FramelessWindowHint) for frameless window.
    you can use QLabel to set the ad-image.
    For windows maximization use setWindowState(Qt::WindowMaximized);

    hope it helps
    Bala

  4. #4
    Join Date
    Feb 2011
    Posts
    23
    Qt products
    Qt4
    Platforms
    Symbian S60 Maemo/MeeGo

    Default Re: how to add ad banner instead of title bar??

    thanks guys for reply,
    but i still have no luck, although i tried more windows flags
    i'm targeting C7 symbian device and i created new qmainwindow based app
    and write this to remove the title and command bar

    Qt Code:
    1. mainwindow::mainwindow(QWidget *parent)
    2. : QMainWindow(parent)
    3. {
    4. setWindowFlags((Qt::FramelessWindowHint);
    5. setWindowState(Qt::WindowMaximized);
    6. // setWindowFlags(windowFlags() | Qt::WindowCloseButtonHint | //Qt::CustomizeWindowHint);
    7. setWindowState(Qt::WindowMaximized);
    8. }
    To copy to clipboard, switch view to plain text mode 
    but that didn't solve

  5. #5
    Join Date
    Feb 2011
    Posts
    23
    Qt products
    Qt4
    Platforms
    Symbian S60 Maemo/MeeGo

    Default Re: how to add ad banner instead of title bar??

    I solved it,
    the problem was in the 'main.cpp' i replaced
    Qt Code:
    1. mainwindow.showmaximized
    To copy to clipboard, switch view to plain text mode 
    by
    Qt Code:
    1. mainwindow.showFullScreen()
    To copy to clipboard, switch view to plain text mode 
    thanks
    Ram

Similar Threads

  1. Windows Title
    By SteveH in forum Qt Programming
    Replies: 7
    Last Post: 22nd November 2010, 13:34
  2. Conceptual Question; QLabel as Banner?
    By SneakyPeterson in forum Newbie
    Replies: 5
    Last Post: 28th June 2010, 08:18
  3. QWizard and banner pixmap
    By desch in forum Qt Programming
    Replies: 8
    Last Post: 7th January 2008, 10:28
  4. widget without title bar???
    By db in forum Newbie
    Replies: 3
    Last Post: 30th August 2007, 21:16
  5. QHeaderView as a banner
    By mclark in forum Qt Programming
    Replies: 1
    Last Post: 21st March 2007, 19:28

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.