API issues moving windows
All  1-9  10-11

Previous
Next
 From:  Michael Gibson
10946.10 In reply to 10946.9 
Hi Joe,

re:
> I can get `resize()` to work but not `move()`...

Is it possible that the coordinates you are giving to move() are not at a visible point on the desktop window? Maybe the y coordinate in particular is underneath the Mac top menu bar.

What happens if you try running this version:

code:
var dlg = moi.ui.createDialog( '<html><body class="DialogBody"><div>testing...</div><moi:DialogClose/></body></html>', 'resizable,defaultWidth:350,defaultHeight:200' );

while ( dlg.waitForEvent() ){
    if ( dlg.event == "display" )
        break;
}

dlg.window.move( 100, 100 );

> In this example, `isModal ` means that it blocks interaction with MoI until it is dismissed (Qt::ApplicationModal).

You can do a modal dialog by calling dialog.window.doModal(); after moi.ui.createDialog(). That will call setWindowModality( Qt::WindowModal );


> Style control the layout and window type like Qt::Window, Qt::Dialog, Qt::Tool, Qt::Popup, etc. Allowing
> the FramelessWindowHint would be cool to do HUDs and overlays.

You can use var menu = moi.ui.showMenu() to create a Qt::Popup window with FramelessWindowHint instead of a dialog.

The options you can currently set for a dialog are:
resizable, fixedWidth, fixedHeight, defaultWidth, defaultHeight, and noCloseButton.

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
 From:  Joe (CTKJOSE)
10946.11 In reply to 10946.10 
@Michael

Thanks for directing me in the right direction. My values were always positive, but kept trying and figure out the issue is MacOS's Menu Bar.

I have to keep my "Y" above 24pt (in Big Sur and above).
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged
 

Reply to All Reply to All

 

 
 
Show messages: All  1-9  10-11