I am new to using QT and relatively new to C++. I have a vector called drives that holds all of the drive letters of a computer. I have an int called noDrives which is drives.size(); I have set in my form in QT Designer 9 Progress bars which I will set all to invisible using
ui.driveLabel1->setVisible(false);
I have forgotten how I would go about setting the bars to visible in a for loop. e.g. int drives = 4 so I need to turn progressBar0-4 to visible. here is what I have so far.
std::vector<std::string> drives = DriveFinder();
int noDrives = drives.size();
for (int i = 0 ; i < noDrives ; i++){
ui.driveBar1->setVisible(false);
}
Each time around the loop I need to turn on the next driveBar.
If I am understanding your question correctly:
Or
Then…