Results 1 to 2 of 2

Thread: QtScript from diffrent files. How use script form diffrent files?

  1. #1
    Join Date
    Oct 2009
    Location
    Russia, South Ural, Chelyabinsk
    Posts
    42
    Thanks
    1
    Thanked 2 Times in 1 Post
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default QtScript from diffrent files. How use script form diffrent files?

    Hi!

    I create app with QtScript support. And I need to use script from diffrent files!
    For example I have two script files: 1.qs, 2.qs.
    and I need to use some function from script file 1.qs in 2.qs file.


    How to do it?

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QtScript from diffrent files. How use script form diffrent files?

    You need to evaluate 1.qs before you evaluate 2.qs (on the same engine). You can implement an "include" function that will load and evaluate 1.qs and call it from 2.qs.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. The following user says thank you to wysota for this useful post:

    eyeofhell (19th January 2010)

Tags for this Thread

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.