Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Change the text in a menu item at run-time

Change the text in a menu item at run-time

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
7 Posts 2 Posters 1.5k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    Chris_2089
    wrote on last edited by
    #1
    This post is deleted!
    JonBJ 1 Reply Last reply
    0
    • C Chris_2089

      This post is deleted!

      JonBJ Online
      JonBJ Online
      JonB
      wrote on last edited by JonB
      #2

      @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.

      C 2 Replies Last reply
      0
      • JonBJ JonB

        @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.

        C Offline
        C Offline
        Chris_2089
        wrote on last edited by
        #3

        @JonB

        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.

        JonBJ 1 Reply Last reply
        0
        • C Chris_2089

          @JonB

          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.

          JonBJ Online
          JonBJ Online
          JonB
          wrote on last edited by JonB
          #4

          @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
              }
          }
          
          1 Reply Last reply
          0
          • JonBJ JonB

            @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.

            C Offline
            C Offline
            Chris_2089
            wrote on last edited by
            #5

            @JonB

            Is this what you're referring to ... with respect to code tags?
            Thanks

            void 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"
                }
            }
            
            
            JonBJ 1 Reply Last reply
            1
            • C Chris_2089

              @JonB

              Is this what you're referring to ... with respect to code tags?
              Thanks

              void 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"
                  }
              }
              
              
              JonBJ Online
              JonBJ Online
              JonB
              wrote on last edited by JonB
              #6

              @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.

              C 1 Reply Last reply
              0
              • JonBJ JonB

                @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.

                C Offline
                C Offline
                Chris_2089
                wrote on last edited by
                #7

                @JonB
                JonB

                Thanks 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.

                1 Reply Last reply
                0

                • Login

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • Users
                • Groups
                • Search
                • Get Qt Extensions
                • Unsolved