[Qt-interest] title bar
linux newbie
linux.newbie79 at gmail.com
Mon Nov 30 07:30:52 CET 2009
Hi All,
Thanks for your valuable info.
Is it possible to find the size of title bar, so that I can draw my
widget "fully" including the title bar?
Thanks
On Fri, Nov 27, 2009 at 8:16 PM, Sean Harmer
<sean.harmer at maps-technology.com > wrote:
> 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 at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>
More information about the Qt-interest-old
mailing list