Programming C++ using Qt4 [closed]

Hey guys I am really new to the C++ programing I have a little knowledge in C and a bit more in C++, but I do not know them enough to call myself a programmer. I am working as a PHP Web Developer I like being a crafts man and creating things so that is the reason to combine the programming with web development. I think that I could really benefit from both of them and so… My question is:

  • Is it a good Idea to learn C++ with Qt or not?
  • Can you give me pros and cons of both?

Note: I do not want to become a programmer and give up the web development I want to combine them both.

For learning C++, Qt has some good things and some bad things.

The good:

  • It provides the building blocks for everything you might want to do with C++, from network programming and threads to OpenGL and displaying web content.
  • It has a few tricks up it sleeves to make things a little easier. For example, it uses the parent hierarchy to handle object deletion makes memory leaks much less common. It also uses signals and slots to provide a somewhat sensible way to write event-driven programs.

The bad things are mostly corollaries of the good things:

  • Because it has everything wrapped up into a nice, cohesive whole, you are de facto encouraged to only use its things. For instance, you’ll be using QString and QList instead of std::string and std::list, because that’s what you’ll get from Qt classes and that’s what Qt classes expect you to provide.
  • When you eventually write non-Qt code with C++, you’ll be missing some of the safety nets. You will really have to be responsible with your memory deallocation, and you’ll have to learn the other patterns for doing event-driven code in C++.

Without Qt, you’ll have to find some external or system library (e.g., outside the C++ standard) for: threads, network programming, GUI programming, graphics rendering (to the screen or to image files), XML parsing, rendering web content, etc. Qt includes classes for all of those things. But if you want to eventually become a generic C++ programmer, you’ll need to learn how to program without it.

Make sure that you know the concepts of object oriented programming, and the specific way in which C++ implements it. Some examples could be operator overloading and multiple inheritance.

I would start by building simple console applications, because they are an easy way to have quick feedback about what you are doing.

When you will have already some knowledge of C++ programming, using any Qt will be fun, because you will be able to draw windows and UI controls etc.

Looking at a library is good because it gives you a good example about how you can structure your code.

If you want to combine them both, then forget Qt, instead look to simple add-on extensions to PHP either via the command line (called using an system exec call), as a soap server (try gsoap) or as full PHP extensions. then you’ll see how you can call and work with a C++ program from your web code which should keep part of the familiarity of coding you already have.

So: start with simple console applications that take input and return output on the command line (ie stdout). Then migrate to a soap server and keep most of your existing code, but restructure it to live in a class with lots of methods that you can call, input and output will be via the soap actions. Then (if necessary) further modify the code to act as a PHP extension.

Once you’ve progressed through those 3 steps of increasing complexity, you should have enough knowledge to fill out better ways of performing the same tasks.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật