I new in qt and i have this problem, any solucion for this and use form extencion .ui
thanks.


Qt Code:
  1. #include "mainwindow.h"
  2. #include "ui_mainwindow.h"
  3. #include<iostream>
  4.  
  5. MainWindow::MainWindow(QWidget *parent) :
  6. QMainWindow(parent),
  7. ui(new Ui::MainWindow)
  8. {
  9. ui->setupUi(this);
  10. std::cout<<"Valor de la x"<<std::endl;
  11. connect(ui->X, SIGNAL(sliderMove()),this, SLOT(on_X_sliderMoved(int)));
  12. }
  13.  
  14. MainWindow::~MainWindow()
  15. {
  16. delete ui;
  17. }
  18.  
  19. void MainWindow::changeEvent(QEvent *e)
  20. {
  21. QMainWindow::changeEvent(e);
  22. switch (e->type()) {
  23. case QEvent::LanguageChange:
  24. ui->retranslateUi(this);
  25. break;
  26. default:
  27. break;
  28. }
  29. }
  30.  
  31. void MainWindow::on_X_sliderMoved(int position)
  32. {
  33. position++;
  34. std::cout<<"Valor de la x"<<position<<std::endl;
  35. }
To copy to clipboard, switch view to plain text mode