Results 1 to 3 of 3

Thread: Learning C++ for Qt

  1. #1
    Join Date
    May 2010
    Posts
    1
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Windows

    Question Learning C++ for Qt

    Hi,

    I have some basic C++ knowledge but not enough to start working with Qt so I'm planning to learn C++.

    In order to work on Qt, should I read everything about C++? I mean what parts in C++ is not important for Qt so I can skip it?

    And what resources (Books or other means) are recommended?

    regards,
    Dana

  2. #2
    Join Date
    Dec 2008
    Location
    Poland
    Posts
    383
    Thanks
    52
    Thanked 42 Times in 42 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: Learning C++ for Qt

    You need to learn everything about C++.

    Qt is a mere framework (written in C++), that means it's "bridge" between You and underlying operating system. In example, on Windows, to create simple GUI application You need to learn WinAPI, but on Linux Xlib. So assuming that you want to write a program that runs both on Windows and Linux You need to know 2API (WinAPI, Xlib (XCB)), but with Qt You need to learn only 1 "API" (Qt). So Qt takes care about everything for you. That said You can still use native API like WinAPI in your Windows program, but that way You can't port that program to Linux because simply Linux don't know what is i.e. GetWindowThreadProcessId(hwnd, &dwID) ; function. (although there may be some equivalent function in Linux, but that way you need to write something like ifdef Linux or something similar).

    I would suggest reading this: http://www2.research.att.com/~bs/homepage.html, it's homepage of Bjarne Stroustrup (creator of C++), and Symfonia C++ TOM 1/2/3 Jerzy Grębosz (<- I don;t know if this position is available in other language the Polish)
    And books like: Foundations of Qt Development, C++-GUI-Programming-with-Qt-4-1st-ed (if I remember correctly one of this books is available for free at qt official website)
    Best luck
    Last edited by Talei; 5th May 2010 at 21:59.

  3. The following user says thank you to Talei for this useful post:

    dana (5th May 2010)

  4. #3
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Learning C++ for Qt

    You need to know about:
    • C++ syntax, including functions, loops, pointers, references
    • classes and inheritance, constructors, destructors
    • public, protected, private access
    • virtual methods and reimplementing them
    • static methods
    • remaining paradigms of object oriented programming


    I recommend Thinking in C++ and the Lippmann's book. You need a decent knowledge of C++ to understand what you are doing with Qt. I can't think of anything in C++ that you can omit. You can probably do without knowledge about templates, at least for some time. Multiple and virtual inheritance is probably not required, as well as overloading operators and detailed stuff like that.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  5. The following user says thank you to wysota for this useful post:

    dana (6th May 2010)

Similar Threads

  1. Learning more about styles
    By bruccutler in forum Newbie
    Replies: 4
    Last Post: 20th February 2010, 10:09
  2. Qt Learning resources
    By Saman in forum Newbie
    Replies: 8
    Last Post: 2nd May 2009, 04:58
  3. Learning by doing
    By skoegl in forum General Discussion
    Replies: 2
    Last Post: 3rd November 2007, 15:18
  4. Learning 2D Graphics
    By ShaChris23 in forum Qt Programming
    Replies: 4
    Last Post: 23rd October 2007, 15:12
  5. Learning Qt with C++
    By Philip_Anselmo in forum Newbie
    Replies: 2
    Last Post: 4th May 2006, 23:37

Tags for this Thread

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.