I'm a CS student and this is my first real job programming. Thanks for the vote of confidence.
I need the ability to click a tool button, save the path taken so that other routines can use it.
void SubNyquist::on_pushFindIC_clicked()
{
ICpath
= QFileDialog::getOpenFileName(this,tr
("Open IC File..."),
path,tr("IC Files (*.rbf)"));
ICpath.replace(tr("/"),tr("\\"));
}
void SubNyquist::on_pushFindIC_clicked()
{
QString path = QDir::currentPath() += tr("/ic1.rbf");
ICpath = QFileDialog::getOpenFileName(this,tr("Open IC File..."),
path,tr("IC Files (*.rbf)"));
ICpath.replace(tr("/"),tr("\\"));
}
To copy to clipboard, switch view to plain text mode
And when a certain function, triggered by a different button, finishes correctly, they want the path displayed on the button itself.
void SubNyquist::on_pushLoadIC_clicked()
{
...
doSomething(Regarding the file given)
...
// And if it doesn't break in the middle...
pushFindIC.setText(ICpath);
...
}
void SubNyquist::on_pushLoadIC_clicked()
{
...
doSomething(Regarding the file given)
...
// And if it doesn't break in the middle...
pushFindIC.setText(ICpath);
...
}
To copy to clipboard, switch view to plain text mode
Bookmarks