Qt book review

The Book of Qt4 coverSome time ago I’ve been asked if I wanted to write a review of one of the new books related to Qt. I agreed and soon after I had a copy of the book in my hands. Thanks go to Camille Herrera of No Starch Press for letting me do this. I’m certainly waiting for more!

 

The Book of Qt4 – The Art of Building Qt Applications review

 

If you do or don’t agree with my review, please leave your comment. Another review of the book is available here (the site seems to be currently down though).

4 Responses to “Qt book review”

  1. marcel says:

    In my opinion, a good programming book is one that teaches you things you couldn’t find out by other means – experimenting, reading docs, etc.

    Since for Qt there are a lot of resources, I don’t see the use of a Qt book for newbies. Therefore your review is too favorable.

    The book is rather useless for users that already know Qt and I think it is the same for users that don’t know Qt and were unable to learn the basics from examples and docs.

  2. wysota says:

    I wouldn’t be that hard… For example for me it is easier to read something from paper than to read it from screen, so a good book is very appreciated.

    Fortunately I’m in contact with the publisher of this book and they asked me to help them improve the second edition, so hopefully some of the problems I mentioned will be corrected.

  3. yose says:

    Hi all, I’m learning to use Qt4 and use this book as reference.

    On the chapter 2 there are a sample code about “Byte Converter”. There are 3 lineEdit widget (editDec, editHex and editBin) which interact each other through signal slot.
    I have follow the instruction step by step, but I have stumble on 2 problems , i.e:
    1. after repeated input (2 or more), the linedit won’t update i.e it just goes blank.
    2. update made to editHex give wrong result: it treat the input as decimal not hex,
    e.g if I input “10″ to editHex the editDec is also “10″ not 16 as it should be.

    Are these problem because I use different version of Qt? (I’m using Qt 4.4.0)
    Anybody have the same experience?

    PS:
    After x-ref the Qt refmanual , I tweak the code :
    1. in the convertion function I change the signal:
    from
    connect (decEdit,SIGNAL(textChanged)(const QString&)), ....
    to
    connect (decEdit,SIGNAL(textEdited)(const QString&)), ....

    The problem maybe because (according to QT ref manual) “textChanged” also emitted signal
    when the text is changed programmatically as it did in the sample code
    2. in hexChanged and binChanged functions, I add the base number for toInt()function.
    e.g from:
    int num=newValue.toInt(&ok);
    to :
    int num=newValue.toInt(&ok,16);
    are these the correct fixes?
    thanks for any feedback.
    regards Newbie

  4. wysota says:

    I think your both problems might be related to each other. Solving the second one should also solve the first one and the change of signals as you propose will not be needed. To solve the second problem indeed you have to use newValue.toInt(&ok, 16), but the code in the book is ok – the part containing the conversion toInt is replaced by a “…” so you should write a proper code in its place and this proper code should of course convert the number using 16 (or 2 in case of binary) as the base.

Leave a Reply