Learning Qt Step by step



  • hi to all
    i found too Qt training file. but i cant found a good step by step (good training index) for learning
    now,could you help me?
    i wanna to learn Qt so good and advance.
    thanks



  • a good starting point would be here:

    "how to learn qt":http://doc.qt.nokia.com/latest/how-to-learn-qt.html

    or here:

    "getting started":http://doc.qt.nokia.com/latest/gettingstartedqt.html



  • You can try a book, for some of us the books (even if Qt ones are somehow out-dated) are the best way to "get into" an framework - the books usually presents the topics in some organized way and it seems to me that you need exactly that, "here":http://developer.qt.nokia.com/books you can find some descriptions of Qt related books.

    //if i remember correctly the first edition of C++ GUI Programming with Qt 4 is available for free download - even if that one uses Qt 4.1 is still a good start, because you can switch to documentation site after you get the basic concepts used by Qt framework.

    Also "this":http://doc.qt.nokia.com/4.7/qt-basic-concepts.html documentation page can be used to read about specific Qt "patterns" - so might be a good start.



  • oh
    thanks for your answer



  • I would also suggest "Qt in Education course material":http://qt.nokia.com/learning/education/course-materials/training-based/



  • There are some strategies:

    1. A good book is C++ GUI Programming with Qt4. Here is the useful documentation you'll need http://doc.qt.nokia.com/4.7/index.html
      2 . Plan for a project to realize in Qt and work to it while you read Qt documentation.
    2. My strategy: I planed to read all.
      I've devided my time in two parts: reading part and working to my project part.
      a) Reading part: I read a section from the book, then I complete the knowledge I've accumulated with the documentation from here http://doc.qt.nokia.com/4.7/index.html . Ex. I read about Widgets in the book, then I read about Widgets in the documentation site, then I read the exercises code from Widgets section. Of course I write the exercises from the book, compile and execute them; I compile and execute the exercises from the site, I modify the code when I want to see some behaviour and so one ... I also plan when I finish the exercises to head for Demonstrations.
      b) Working on my project part. This is the most beautiful part and I like it the most.
    3. My strategy is not the best. Many people don't read all the stuff but jump to the parts relevant to their project. Some don't even bother too much to search for documentation, they post a topic in forum with something that they want to realize and receive the links to the relevant documentation. Looks they are more efficient. They complete their projects faster than me.


  • Hi
    Thanks for your complete answer Edico. ;)



  • I don't think a book is necessary. You first have to understand (or at least know ) some of the design practices and specifics mechanisms of the framework. For example, you have to understand signal and slots mechanisms or the parent-child hierarchy of QObjects. The best way is to read the dedicated articles on the website or watch the videos as suggested earlier. Then there is 2 methods which complement each other: Reading the Examples source gives the advantage to see exactly the code and the results (and even to see how it behaves differently when you modify the source); Reading the documentation every time you want to do anything :). You want to read a file? First search "read a file " on this forum and see which responses are given by the gurus or people which seems to know what they talk about.

    quick note: I started my first day at work with 0 knowledge of Qt and had to learn while building my application... So really don't miss the first step because I did.



  • Hi,
    If you want to headstart...the videos posted on this youtube channel http://www.youtube.com/user/VoidRealms really helped me. I started from scratch here. He covers the basic elements very well and once you reach tutorial 30 ....you feel pretty confident to move on on your own and of course with the help of this amazing group of people contributing to the development forums.



  • Cool videos amban. Have you looked at some of the previous summit talks available on this site? "Check them out":http://developer.qt.nokia.com/elearning



  • These codes is not enough , where is the other codes? Could you Email me the other codes?

    [COPY FROM "Your text to link here...":http://qt-project.org/doc/qt-4.8/gettingstartedqt.html]
    Let us look at the code:

    5 class Notepad : public QWidget
    6 {
    7 Q_OBJECT
    8
    9 public:
    10 Notepad();
    11
    12 private slots:
    13 void quit();
    14
    15 private:
    16 QTextEdit *textEdit;
    17 QPushButton *quitButton;
    18 };The Q_OBJECT macro must be first in the class definition, and declares our class as a QObject (Naturally, it must also inherit from QObject). A QObject adds several abilities to a normal C++ class. Notably, the class name and slot names can be queried at run-time. It is also possible to query a slot's parameter types and invoke it.

    Line 13 declares the slot quit(). This is easy using the slots macro. The quit() slot can now be connected to signals. We will do that later.

    Instead of setting up the GUI and connecting the slot in the main() function, we now use Notepad's constructor.

    20 Notepad::Notepad()
    21 {
    22 textEdit = new QTextEdit;
    23 quitButton = new QPushButton(tr("Quit"));
    24
    25 connect(quitButton, SIGNAL(clicked()), this, SLOT(quit()));
    26
    27 QVBoxLayout *layout = new QVBoxLayout;
    28 layout->addWidget(textEdit);
    29 layout->addWidget(quitButton);
    30
    31 setLayout(layout);
    32
    33 setWindowTitle(tr("Notepad"));
    34 }As you saw in the class definition, we use pointers to our QObjects (textEdit and quitButton). As a rule, you should always allocate QObjects on the heap and never copy them.

    We now use the function tr() around our user visible strings. This function is necessary when you want to provide your application in more than one language (e.g. English and Chinese). We will not go into details here, but you can follow the Qt Linguist link from the learn more table.

    Here is the quit() slot:

    75 void Notepad::quit()
    76 {
    77 QMessageBox messageBox;
    78 messageBox.setWindowTitle(tr("Notepad"));
    79 messageBox.setText(tr("Do you really want to quit?"));
    80 messageBox.setStandardButtons(QMessageBox::Yes | QMessageBox::No);
    81 messageBox.setDefaultButton(QMessageBox::No);
    82 if (messageBox.exec() == QMessageBox::Yes)
    83 qApp->quit();
    84 }

    [quote author="yan bellavance" date="1311276359"]a good starting point would be here: "how to learn qt":http://doc.qt.nokia.com/latest/how-to-learn-qt.html or here: "getting started":http://doc.qt.nokia.com/latest/gettingstartedqt.html[/quote]



  • sorry
    this topic posted one year ago!!


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.