I used QtScript Generator to generate the QT bindings.

Then I imported all the bindings into C++ and tried to make a quick sample program. What I am trying to do, is use QTDesigner to create a .ui file, and then use QtScript and QUiLoader to load the ui file in the script. I continuously get segfaults on the load portion.

Here is a simple version of the code.

Qt Code:
  1. function testThis(parent){
  2. QMainWindow.call(this,parent);
  3. this.loadUi();
  4. }
  5.  
  6. testThis.prototype = new QMainWindow();
  7.  
  8.  
  9. testThis.prototype.loadUi = function(){
  10.  
  11. var loader = new QUiLoader();
  12. var file = new QFile('./test.ui');
  13. var fileExists = file.exists();
  14. if(fileExists)
  15. {
  16. var fileOpen = file.open(QIODevice.ReadOnly);
  17. if(fileOpen){
  18. var huh = loader.createWidget("QLabel",0, "test");
  19.  
  20. huh.show();
  21.  
  22. var ui = this.loader.load(this.file,this);
  23.  
  24. file.close();
  25. }
  26. }
  27. }
  28. var newWindow = new testThis();
To copy to clipboard, switch view to plain text mode 

the C++ side works fine, I am basically using the qs_eval that ships with the scripts to even try and test this. All of the opens and exists are true, so the QFile is there.

Just the ui=loader.load is where the problems are.. any help would be appreciated.

Oh the huh label shows up just fine, so I know that the QUiLoader is at least working and creating widgets by name.