Unsolved Change the text in a menu item at run-time
-
This post is deleted! -
@Chris_2089
What is your question here?And please use the forum's Code tags (button above where you type in) to enclose any code blocks to make them readable.
-
Hi JonB, I'm somewhat new to this forum.
My post was not a question. I thought I had replied to the original post that was a question. With regards to the forum's Code tags ... well I'll have to investigate this. i.e, I'm not sure what that refers to at this stage. Open to any pointers on this ... Thanks. -
@Chris_2089
Hi and welcome!My post was not a question. I thought I had replied to the original post that was a question.
Somehow you have not clicked Reply in the original post, you have instead created a New Topic, as you can see! :)
With regards to the forum's Code tags
When posting a multi-line block of code: either select it and, from the row of buttons above where you type in click the
</>
button (tooltip Code), or put lines of just 3-adjacent-backticks on a line above the first line of your code and on a line below the last line of of your code, which will make it look like this:if (some_condition) { while (this-is-nicely-readable) { print("{\"}''"); // a comment here } }
-
Is this what you're referring to ... with respect to code tags?
Thanksvoid MainWindow::on_action_Show_Hide_triggered() { if(activityLogView){ // if the Activity LOG is already on view ui->splitter->setSizes(QList<int>() << 100 << 0); // sets the splitter to hide Activity LOG activityLogView = HIDE; // set the flag - Activity LOG hiden ... but NOT disabled ui->action_Show_Hide->setText("&Show"); // Now change the menu text such that next time the option will be "Show" } else { // if the activity LOG is hiden ui->splitter->setSizes(QList<int>() << 300 << 210); // sets the splitter back to default position ... Showing the activity LOG activityLogView = SHOW; // set the flag - Activity LOG on Show ui->action_Show_Hide->setText("&Hide"); // Now change the menu text such that next time the option will be "Hide" } }
-
@Chris_2089
Yep --- doesn't this help us a lot to read your code?! :)Now if you want to post this as a reply in that original topic, go back to that and use the blue Reply button at the bottom of that page to do so.
-
@JonB
JonBThanks heaps!! ... you really helped greatly ... needless to say that I would like to contribute to these forums in return for the help that I have acquired from them.