HELP!!, AM A BEGINNER [Closed] [Duplicate]



  • here is the code for a slider that changes the value of the progress bar. The problem is, at a time only one progress bar works . Though both of them are connected, niether of them disconnected.

    #include "mainwindow.h"

    #include "ui_mainwindow.h"

    MainWindow::MainWindow(QWidget *parent) :

    QMainWindow(parent), ui(new Ui::MainWindow)
    {

    ui->setupUi(this);

    connect(ui->horizontalSlider,SIGNAL(valueChanged(int)),ui->progressBar,SLOT(setValue(int)));

    ui->setupUi(this);
    

    connect(ui->horizontalSlider,SIGNAL(valueChanged(int)),ui->progressBar_2,SLOT(setValue(int)));

    }

    MainWindow::~MainWindow()
    {
    delete ui;
    }



  • Welcome to the forum,

    Please do not post the "same":http://qt-project.org/forums/viewthread/22725/ question twice.

    @mods - topic to be closed as duplicate.



  • Thanks .
    And sure, as u say :)


  • Moderators

    Closing thread as duplicate.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.