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. HOW and WHERE do I start with the Hello Notepad example?
Forum Updated to NodeBB v4.3 + New Features

HOW and WHERE do I start with the Hello Notepad example?

Scheduled Pinned Locked Moved General and Desktop
7 Posts 3 Posters 1.5k Views 1 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.
  • T Offline
    T Offline
    technovelist
    wrote on 20 Sept 2014, 16:18 last edited by
    #1

    I am trying to get started with Qt programming, and have landed on the following page:
    https://qt-project.org/doc/qt-4.7/gettingstartedqt.html
    It sounds great, but it starts in the middle of the story.

    Exactly HOW and WHERE do I type in the code?
    Can I do this with Qt Creator?
    If so, what kind of project should I create?
    This code looks like C++, so do I need to create a new C++ file for it, or is that supposed to happen automatically if I select the right type of project?

    I need precise steps saying something like:

    1. Open this dev environment
    2. Create this type of project
    3. Add this type of file to it
      and so on.

    I'm sure this is very obvious to anyone who has been using this software for awhile, but to a complete novice it is anything but obvious.

    Note: I have a great deal of programming experience and don't have any difficulty with the code itself. The question is where to put it so that it will build and I can try it out. I'm also a multiply published author who has a lot of experience explaining things to people who don't already know them, so I realize that it is often difficult for an experienced person to realize what things are not obvious to people who don't have that experience.

    Thanks.

    1 Reply Last reply
    0
    • D Offline
      D Offline
      dheerendra
      Qt Champions 2022
      wrote on 20 Sept 2014, 16:34 last edited by
      #2

      Welcome to the forum

      1. Open Qt Creator
      2. File->NewFile or Project
      3. Application->Widget Project
      4. Type any project name
      5. Next
      6. BaseClass - QWidget
      7. Uncheck "Generate Form"
      8. Done

      Compile your project and n'joy.

      Dheerendra
      @Community Service
      Certified Qt Specialist
      http://www.pthinks.com

      1 Reply Last reply
      0
      • S Offline
        S Offline
        SGaist
        Lifetime Qt Champion
        wrote on 20 Sept 2014, 16:41 last edited by
        #3

        Hi and welcome to devnet,

        To add to Dheendra, you should also take a more recent version of the documentation and example. Qt 4.7 is pretty old, you should match the version you installed

        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
        0
        • T Offline
          T Offline
          technovelist
          wrote on 20 Sept 2014, 16:47 last edited by
          #4

          Thanks, I'll look for a newer version. I have installed Qt Creator 3.2.1, which says it is based on Qt 5.3.2.

          However, there is no "Widget Project" listed under "Applications" (not "Application"). I tried "Qt Widgets Application" but it doesn't look very similar to the example. Which type of project should I use?

          1 Reply Last reply
          0
          • S Offline
            S Offline
            SGaist
            Lifetime Qt Champion
            wrote on 20 Sept 2014, 19:42 last edited by
            #5

            You took the correct project. However, don't block on the look of the widget/window. If I'm not mistaken the style of the widgets comes from an old version of KDE 4 maybe even 3.

            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
            0
            • T Offline
              T Offline
              technovelist
              wrote on 20 Sept 2014, 21:32 last edited by
              #6

              Never mind, I think I know what's wrong.

              1 Reply Last reply
              0
              • T Offline
                T Offline
                technovelist
                wrote on 20 Sept 2014, 22:00 last edited by
                #7

                Never mind. See post above.

                1 Reply Last reply
                0

                3/7

                20 Sept 2014, 16:41

                • Login

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