[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Re: Widgets & layouts
From:       Espen Sand <espen.sand () neo ! no>
Date:       1999-11-16 7:45:41
[Download RAW message or body]

On man, 15 nov 1999, Matt Koss wrote:
>
>2. KDialogBase & centering 
>
>   Caitoo's preferences dialog is now based on KDialogBase, but when opened,
>   it is strangely centered on the screen.
>   It seems that the left-top corner is put into the center of the screen and
>   the rest of dialog is built in the right-bottom direction.
>   This leads to the half of the dialog out of the screen, which is not what I
>   call "centered".
>   Am I doing something wrong, or is it a bug in KDialogBase ?
>
>
>   I have found out that this is somehow caused by call to disableResize().
>   When I don't call it, dialog is nicely centered on the screen.

I think you must wait using disableResize() until right before exec(). It seems
to me (I have looked in kmainwidget.cpp) that you change the dialog
contents/size after the PreferencesDlg constuctor.

so try this:

PreferencesDlg dlg; // without disableResize() !!
//<lot of stuff that change the size of the dialog>
dlg.disableResize();
int ret = dlg.exec();

and give the dialog a parent different from 0 (eg, PreferencesDlg dlg(this) )

>
>    BTW, how is the help feature in KDialogBase supposed to work ? I mean the
>    linked help stuff.
>
dlg.setHelpLinkText( "the link text" );
dlg.enableLinkedHelp( true );

Once you clik on the link it will execute what has been defined by
dlg.setHelp( <url>, <topic> )

The problem is that this url is shared with what the "Help" button uses
so this issue needs to be refined later. The link could provide another link 
than what the "Help" button does.

-- 
Espen Sand

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic