So I have a scrollBar and a plainTextEdit in a window automatically created. I want the text of plainTextEdit automatically changes when the value of the scrollBar is changed. This should be some easy stuff: just add a method to MainWindow to be the "slot" which receive signal from the scrollBar.
However in Eclipse "Qt Signal Slot Editor" I cannot find the method I added to MainWindow. What is the proper way to do that?
import com.trolltech.qt.gui.*;
public class MainWindow extends QMainWindow{
Ui_MainWindow ui = new Ui_MainWindow();
public static void main(String[] args) {
QApplication.initialize(args);
MainWindow testMainWindow = new MainWindow();
testMainWindow.show();
QApplication.exec();
}
public MainWindow() {
ui.setupUi(this);
}
public MainWindow(QWidget parent) {
super(parent);
ui.setupUi(this);
}
public void test(Integer t) {
//this is the slot
}
}