Which C ++ libraries should I learn

The German Python forum

Post Sun Jan 26, 2014 01:12

BlackJack wrote:@ mephisto-online: Qt is written in C ++ and `PySide` or` PyQt` are Python connections to the Qt library. The libraries provide the functions and classes in the library as Python objects. The concept of Qt's signals and slots initially has nothing to do with the C ++ programming language, this is a specialty of Qt. For this purpose, the Qt project provides a special preprocessor, the "Meta Object Compiler" (`` moc '') and a build tool called `` qmake '' that knows this compiler.
With the moc, I didn't know that yet, I had just started with C ++ to declare my main classes. The rest was already clear to me.
BlackJack wrote: In my opinion, you should only learn C ++ if there is no other way. But I am biased because I cannot cope with the language.
Oh, that's good, it was exactly the same for me! And I thought that I was just too stupid ...
BlackJack wrote: It's just as hell complicated and annoying.
I thought so too. Actually even unnecessarily complicated!
BlackJack wrote: And with Qt together it is probably a little bit more bearable because the library provides a lot of useful things and "enforces" a certain style, so you no longer have to be confronted with the whole complexity of C ++.
I noticed that right at the beginning when I wanted to do something with a string and the stdlib and then the whole thing with QString. But why should you make it easy when it can be complicated.
BlackJack wrote: To be able to use Qt in Python you have to be able to read the library's C ++ documentation, but that is much easier than actually learning to program in C ++. It's mainly about being able to read C ++ function and method signatures and understanding how to map the information from the Qt documentation to Python. Otherwise, the concepts behind the Qt classes and how the components play together are IMHO very well and extensively documented in the Qt documentation; and that largely independent of language.
Thats all right ! Actually, I'm making very good progress with learning. First I explained a pure Python tutorial and now one with the PySide or PyQt package. First I did that with the NinjaIDE. But that had constantly unsettled me because the interpreter was always supposed to not like something. Now, with PyCharm, it's really fun. It was the sentences that I quoted above that made me feel insecure. In this context, a few examples did not work because there were imports that simply do not exist and have not appeared anywhere in the text (e.g. from __future__ import print_function). But all in all, it starts out that I find the Python language really cool, especially with the possibilities of PySide.

But in any case, thanks for the 100% confirmation that you really don't need C ++ to write "normal" programs.

P.S .: Only Win7 disappointed me one more time! Had copied a nice Tetris program in Python and wanted to make a little wave with my wife. But with Win7 you have to install Python first. This is always standard on Linux and also on the Mac.