qt-interest@trolltech.com
[Top] [All Lists]

Re: [Qt-interest] title bar

Subject: Re: [Qt-interest] title bar
From: Sean Harmer
Date: Fri, 27 Nov 2009 09:16:26 +0000
Hi,

On Friday 27 November 2009 06:44:56 Gordon Schumacher wrote:
> linux newbie wrote:
> > Hi,
> >
> > I am using Qt on embedded ARM platform.
> >
> > 1. Is it possible to change title bar size?
> > 2. My screen size is 640x240. If I call resize(640, 240) in the
> > constructor, the window is not display'd fully. It is observed that
> > bottom lines were clipped (which is equal to height of title bar).
> 
> I suggest using showFullScreen() instead - that's what I'm doing in my
> Qt/E app.

We do this for some apps too. It works well in the case of a single 
mainwindow/dialog. When we have a number of dialogs though we derive our 
dialogs from a base class that uses the Qt::FramelessWindowHint and manually 
sets the geometry of the dialog to fill the screen. Something like this:

BaseDlg::BaseDlg( QWidget* parent )
    : QDialog( parent, Qt::FramelessWindowHint ),
      m_desktop( new QDesktopWidget() )
{
    QRect r = m_desktop->availableGeometry();
    setGeometry( r );
    setMaximumSize( r.width(), r.height() );
    setMinimumSize( r.width(), r.height() );
}

we then also have an init() function that modifies the style sheet to show a 
background pixmap of the correct size etc. The derived dialogs then call 
init() from their constructor.

Cheers,

Sean
_______________________________________________
Qt-interest mailing list
Qt-interest@xxxxxxxxxxxxx
http://lists.trolltech.com/mailman/listinfo/qt-interest

<Prev in Thread] Current Thread [Next in Thread>