Hi folks,

I recently started (again) playing around with Qt (last time was 3.3 I guess). And I have come across an issue I would like to confirm with you.
This is what I did initially:

  • Create a Qt Jambi Project in Eclipse (3.4)
  • Create a Qt Jambi Design Form (MainWindow)
  • Created a simple UI (with Eclipse Designer Interface)


Now I understand that I need to connect the button (pushButton_add) to a slot. This is where I am facing the issue. I do not seem to be able to do so.

After a bit of googling I tried to hard code the connection in the TestMain.java file that has been generated buy the designer (TestJava.jui). The problem is now, when I change my UI, the Designer generates a new TestMain.java, overwriting my edits (inconvenient to say the least!). I am now required to rely on TestMainImpl.java for slot definition?

Qt Code:
  1. public class TestMainImpl extends QMainWindow {
  2. TestMain ui = new TestMain();
  3.  
  4. public static void main (String[] args) {
  5. ...initialize();
  6. ...
  7. ...exec();
  8. }
  9.  
  10. public TestMain() {
  11. ui.setupUi(this);
  12. //is this the right place for that?!?!?!?!
  13. ui.pushbutton_add.clicked.connect(this, "pushButton_add_clicked()");
  14. }
To copy to clipboard, switch view to plain text mode 

That is sad but ok, if it has to be like this, I can deal with it. What is the Signal/Slot editor for then anyways? Am I doing something wrong; did I misunderstand a concept? Please help me out here, your help is greatly appreciated.

Good day

Ronny