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. Wizard fails to generate code
Forum Updated to NodeBB v4.3 + New Features

Wizard fails to generate code

Scheduled Pinned Locked Moved Unsolved General and Desktop
8 Posts 4 Posters 1.1k Views 2 Watching
  • 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.
  • E Offline
    E Offline
    efjellanger
    wrote on last edited by
    #1

    Hi all, very basic question here.

    I am trying to follow the tutorial about making a Notepad app at http://doc.qt.io/qt-5/qtwidgets-tutorials-notepad-example.html.

    I try to follow the steps exactly, but when I get to the Notepad Header File section, the Wizard has not created any of the code I expect. My application also doesn't have any of the buttons shown in the tutorial when I run it.

    I'm using QT Creator 4.8.0. Can anyone guess what I've done wrong?

    Thank you!

    jsulmJ 1 Reply Last reply
    0
    • E efjellanger

      Hi all, very basic question here.

      I am trying to follow the tutorial about making a Notepad app at http://doc.qt.io/qt-5/qtwidgets-tutorials-notepad-example.html.

      I try to follow the steps exactly, but when I get to the Notepad Header File section, the Wizard has not created any of the code I expect. My application also doesn't have any of the buttons shown in the tutorial when I run it.

      I'm using QT Creator 4.8.0. Can anyone guess what I've done wrong?

      Thank you!

      jsulmJ Online
      jsulmJ Online
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @efjellanger Hi and welcome? Did you install Qt? Are there any errors when you create your project? What is generated?

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • E Offline
        E Offline
        efjellanger
        wrote on last edited by efjellanger
        #3

        Yes, I have QT version 5.11.0 (which is the version used by a different project I am working on). The tutorial builds and runs just fine, but when it runs I get a window that looks very blank compared to what the tutorial shows. No File or Edit menu, no buttons below it. Just a text box.

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

          Hi and welcome to devnet,

          Did you create the GUI with Designer ?

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

          E 1 Reply Last reply
          0
          • SGaistS SGaist

            Hi and welcome to devnet,

            Did you create the GUI with Designer ?

            E Offline
            E Offline
            efjellanger
            wrote on last edited by
            #5

            @SGaist Yes, as I said, I followed these instructions:

            http://doc.qt.io/qt-5/qtwidgets-tutorials-notepad-example.html

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

              What code are you expecting to be generated ?

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

              E 1 Reply Last reply
              0
              • SGaistS SGaist

                What code are you expecting to be generated ?

                E Offline
                E Offline
                efjellanger
                wrote on last edited by
                #7

                @SGaist
                So right here it says "The wizard generated a header file for the Notepad class that has the necessary #includes, a constructor, a destructor, and the Ui object. The file looks as follows:"

                But the wizard didn't generate anything, my header file doesn't look as follows, it has almost nothing in it.

                mrjjM 1 Reply Last reply
                0
                • E efjellanger

                  @SGaist
                  So right here it says "The wizard generated a header file for the Notepad class that has the necessary #includes, a constructor, a destructor, and the Ui object. The file looks as follows:"

                  But the wizard didn't generate anything, my header file doesn't look as follows, it has almost nothing in it.

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

                  @efjellanger
                  Hi
                  The buttons and menus are first added in section
                  "Adding User Interaction"
                  So first after than your .h file will have
                  private slots:
                  void newDocument();
                  void open();
                  void save();
                  void saveAs();
                  void print();
                  void exit();
                  and the other elements.

                  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