Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Practicing an example on Docs
QtWS25 Last Chance

Practicing an example on Docs

Scheduled Pinned Locked Moved Solved General and Desktop
10 Posts 3 Posters 2.2k 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.
  • tomyT Offline
    tomyT Offline
    tomy
    wrote on last edited by
    #1

    Hi,

    I'm trying to walk though this example of Docs and create that simple app. I've done the works according to the instructions of the example correctly until the section Adding Menu Items. But the problem is the instructions say that the "type here" and "Menu" are put on the Form by default while it's not the fact in essence.

    I got stuck to that section and don't know how to complete the app.
    Could you please help me?

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      You should add which version of Qt and Qt Creator you are using.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      1
      • tomyT Offline
        tomyT Offline
        tomy
        wrote on last edited by
        #3

        My Qt's version is 5.9 and use Qt Creator 4.3.0.

        mrjjM 1 Reply Last reply
        1
        • tomyT tomy

          My Qt's version is 5.9 and use Qt Creator 4.3.0.

          mrjjM Offline
          mrjjM Offline
          mrjj
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @tomy

          hi
          What is the issue ?
          The menu bar is not there?
          Why cannot you just click and type ?

          I dont understand what u mean by
          "put on the Form by default while it's not the fact in essence."

          tomyT 1 Reply Last reply
          2
          • tomyT Offline
            tomyT Offline
            tomy
            wrote on last edited by
            #5
            This post is deleted!
            1 Reply Last reply
            0
            • mrjjM mrjj

              @tomy

              hi
              What is the issue ?
              The menu bar is not there?
              Why cannot you just click and type ?

              I dont understand what u mean by
              "put on the Form by default while it's not the fact in essence."

              tomyT Offline
              tomyT Offline
              tomy
              wrote on last edited by
              #6

              @mrjj
              docs say that the "type here" and "Menu" are put on the Form, but they are not. That is, none of "Menu" and "type here" is there.

              mrjjM 1 Reply Last reply
              0
              • tomyT tomy

                @mrjj
                docs say that the "type here" and "Menu" are put on the Form, but they are not. That is, none of "Menu" and "type here" is there.

                mrjjM Offline
                mrjjM Offline
                mrjj
                Lifetime Qt Champion
                wrote on last edited by mrjj
                #7

                @tomy

                Ok , and it is a mainwindow, you are doing this on/with ?

                If you right click on the window, do you then have
                "Create Menu Bar" ?
                alt text

                1 Reply Last reply
                3
                • tomyT Offline
                  tomyT Offline
                  tomy
                  wrote on last edited by
                  #8

                  Thank you, the problem is solved.
                  The app runs but there is an issue with it. It doesn't show .txt file for opening!

                  mrjjM 1 Reply Last reply
                  0
                  • tomyT tomy

                    Thank you, the problem is solved.
                    The app runs but there is an issue with it. It doesn't show .txt file for opening!

                    mrjjM Offline
                    mrjjM Offline
                    mrjj
                    Lifetime Qt Champion
                    wrote on last edited by mrjj
                    #9

                    @tomy said in Practicing an example on Docs:

                    .txt file for opening!

                    Hi, it should
                    QString fileName = QFileDialog::getOpenFileName(this, tr("Open File"), QString(), tr("Text Files (.txt);;C++ Files (.cpp *.h)"));

                    There seems to be ";;"
                    check docs (for getOpenFileName) that this is indeed correct syntax.

                    1 Reply Last reply
                    2
                    • tomyT Offline
                      tomyT Offline
                      tomy
                      wrote on last edited by
                      #10

                      Yes, the issue was solved.
                      Thanks.

                      1 Reply Last reply
                      1

                      • Login

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