Results 1 to 2 of 2

Thread: QtCreator and Zetcode tutorials

  1. #1
    Join Date
    Mar 2010
    Posts
    9
    Qt products
    Qt4
    Platforms
    MacOS X

    Default QtCreator and Zetcode tutorials

    All,

    I am new to C++ programming and Qt, so I need a slower start than provided in the QtCreator tutorials. I've found:

    http://www.zetcode.com/tutorials/qt4.../introduction/

    The first example is:

    #include <QApplication>
    #include <QWidget>

    int main(int argc, char *argv[])
    {
    QApplication app(argc, argv);

    QWidget window;

    window.resize(250, 150);
    window.setWindowTitle("Simple example");
    window.show();

    return app.exec();
    }

    Now, I'm wondering if I can somehow load this simple code into QtCreator and compile, getting the resulting window to pop up. Possible?

    David.

  2. #2
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: QtCreator and Zetcode tutorials

    Yes.
    • Start Qt Creator.
    • File > New Project. Select "Empty Qt4 Project".
    • File > New File or Project. Select "C++ Source File"
    • Name the file (e.g. main.cpp), and paste your code in.
    • Build.

Similar Threads

  1. QT tutorials
    By T3AB4GG3R117 in forum Newbie
    Replies: 6
    Last Post: 20th April 2016, 15:49
  2. Good beginner tutorials
    By bijan311 in forum Newbie
    Replies: 2
    Last Post: 2nd March 2010, 08:37
  3. I can't see the code in the Qt Tutorials
    By choucete in forum Newbie
    Replies: 1
    Last Post: 3rd February 2009, 00:31
  4. QSA tutorials/books
    By bouy in forum General Discussion
    Replies: 1
    Last Post: 27th February 2007, 08:11

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.