Jump to content

Machine Action Question, closing window


Recommended Posts

Posted · Machine Action Question, closing window

I have a plugin that adds two machine actions for a specific machine in Cura. I've been able to figure out most things from existing models/trial and error but I've gotten stumped by one issue.

Within the action window, the user can click a button to do some http requests with a networked printer. What I would like to happen is the user clicks a button, a confirmation dialog appears, and then if the user clicks "Yes", then the confirmation dialog AND the machine action window will close. Closing the confirmation dialog is simple, I just call .close(), but this doesn't work for the MachineAction. I get this error: 

TypeError: Property 'close' of object NautilusUpdate_QMLTYPE_401(0x600007652470) is not a function

What can I call to close the window?

  • Link to post
    Share on other sites

    Create an account or sign in to comment

    You need to be a member in order to leave a comment

    Create an account

    Sign up for a new account in our community. It's easy!

    Register a new account

    Sign in

    Already have an account? Sign in here.

    Sign In Now
    • Our picks

      • Introducing the UltiMaker Factor 4
        We are happy to announce the next evolution in the UltiMaker 3D printer lineup: the UltiMaker Factor 4 industrial-grade 3D printer, designed to take manufacturing to new levels of efficiency and reliability. Factor 4 is an end-to-end 3D printing solution for light industrial applications
          • Thanks
          • Like
        • 3 replies
      • UltiMaker Cura 5.7 stable released
        Cura 5.7 is here and it brings a handy new workflow improvement when using Thingiverse and Cura together, as well as additional capabilities for Method series printers, and a powerful way of sharing print settings using new printer-agnostic project files! Read on to find out about all of these improvements and more. 
          • Like
        • 26 replies
    • Create New...