OESF | ELSI | pdaXrom | OpenZaurus | Zaurus Themes | Community Links | Ibiblio

IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Dialog Sizing
marshmn
post Aug 4 2005, 12:45 AM
Post #1





Group: Members
Posts: 69
Joined: 18-November 04
From: Watford, UK
Member No.: 5,508



Hi,

In an app I'm creating I have a dialog that pops up. I'd like to have the dialog be maximised to fill the whole screen, but I can't see how I go about doing that?

I've played around with the different "sizePolicy" settings, but none of these seem to make it fill to fit the screen. I thought that perhaps setting the policy to "Expanding/Expanding" would do the trick, but it seems not.

I'm launching the dialog by doing:

CODE
UploadDialog dialog(this);
dialog.exec();


Can anyone give me an idea how I should be doing this?

Thanks,
Matt
Go to the top of the page
 
+Quote Post
vanstrien
post Aug 5 2005, 06:05 PM
Post #2





Group: Members
Posts: 58
Joined: 22-August 03
From: Houston / London
Member No.: 374



I think I know what you are asking.

In the past when I have needed to do what you want I've used:
CODE
showMaximized();


See: http://doc.trolltech.com/qtopia1.7/html/qwidget.html#b6e000

Does that help?
Go to the top of the page
 
+Quote Post
melee
post Aug 6 2005, 08:27 AM
Post #3





Group: Members
Posts: 69
Joined: 17-March 05
Member No.: 6,651



Hi,

Alternately in the dialog constructor, get the parent widgets size and resize accordingly
Allows you to make it slightly smaller than full screen (or any size you want.)

eg

DefDlg::DefDlg( QWidget* parent, const char* name, bool modal, WFlags fl )
: QDialog( parent, name, modal, fl )
{
if ( !name )
setName( "DefDlg" );
resize(parent->width() - 50, parent->height() - 50 );
// more stuff
}

regards

Melee
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
2 User(s) are reading this topic (2 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 20th December 2014 - 12:51 PM