Results 1 to 5 of 5

Thread: Message Box in Qscript

  1. #1
    Join Date
    Mar 2015
    Posts
    8
    Qt products
    Qt4
    Platforms
    Windows

    Default Message Box in Qscript

    Using QScript is it possible to create, repeatedly update and then destroy a message box (or similar). I would like to create a progress indicator.

    Thanks

    Allan

  2. #2
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Message Box in Qscript

    If you can work with a single progress dialog, then the easiest way is to create an instance and export it to QtScript using QScriptEngine::newQObject().

    Might need a sub class of QProgressDialog so you can call a method that processes events while the script is running, or additionally export a function that does that.

    If you need the script to be able to create instance of the progress dialog, then it gets a bit more complicated but not a lot.

    Cheers,
    _

  3. #3
    Join Date
    Mar 2015
    Posts
    8
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Message Box in Qscript

    Thanks - but I dont have access to the source for the project, just the QScript module - so that sounds like a no.

    Unless ther are any other options

    Allan

  4. #4
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Message Box in Qscript

    In this case you are out of luck.
    QtScript can only access functionality that the host application has exported.

    Cheers,
    _

  5. #5
    Join Date
    Mar 2015
    Posts
    8
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Message Box in Qscript

    I thought that would be the case.

    Thanks for taking the time to comment.

    Allan

Similar Threads

  1. Arrays in QScript
    By tsrplatelayer in forum Newbie
    Replies: 3
    Last Post: 6th March 2015, 12:12
  2. Can't get qScript to work
    By lni in forum Qt Programming
    Replies: 1
    Last Post: 18th September 2010, 21:49
  3. How to use QScript?
    By lni in forum Qt Programming
    Replies: 5
    Last Post: 2nd August 2010, 14:36
  4. QScript workbench in 4.3
    By jh in forum Qt Programming
    Replies: 3
    Last Post: 29th October 2009, 13:53
  5. QVariantList from QScript?
    By musla in forum Qt Programming
    Replies: 0
    Last Post: 29th June 2009, 10:22

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.