PDA

View Full Version : how to add ad banner instead of title bar??



ram4soft
17th February 2011, 14:09
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

boudie
17th February 2011, 14:18
Start reading about Window Flags:
http://doc.qt.nokia.com/4.6/widgets-windowflags.html

BalaQT
17th February 2011, 14:34
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

ram4soft
17th February 2011, 16:16
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


mainwindow::mainwindow(QWidget *parent)
: QMainWindow(parent)
{
setWindowFlags((Qt::FramelessWindowHint);
setWindowState(Qt::WindowMaximized);
// setWindowFlags(windowFlags() | Qt::WindowCloseButtonHint | //Qt::CustomizeWindowHint);
setWindowState(Qt::WindowMaximized);
}
but that didn't solve
:(

ram4soft
20th February 2011, 09:03
I solved it,
the problem was in the 'main.cpp' i replaced
mainwindow.showmaximized by
mainwindow.showFullScreen()
thanks
Ram