Results 1 to 7 of 7

Thread: Qt4 Books Guide problem, cant run programs on Qt5

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jun 2013
    Posts
    3
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: Qt4 Books Guide problem, cant run programs on Qt5

    yes it works now, i've included the QHBoxLayout and QVBoxLayout in the finddialog.cpp then i guess i have typos in case sensivity area anyway i got it all work now with your help and thank you again,

    by the way before i continue my reading in qt book, do you have any more tips or suggestion so i cant ask again cuz i might bother someone again which is not good for the busy people around working for the better tomorrow...I mean as long as i add this QT += widgets in the .pro file, ill be running both qt 4 and 5, then also i'll goind to read the link you gave to me then nothing more.....



    case Solved

  2. #2
    Join Date
    May 2010
    Location
    Romania
    Posts
    1,021
    Qt products
    Qt5
    Platforms
    MacOS X Unix/X11 Windows Android
    Thanks
    62
    Thanked 260 Times in 246 Posts

    Default Re: Qt4 Books Guide problem, cant run programs on Qt5

    Quote Originally Posted by hot_tea View Post
    ...by the way before i continue my reading in qt book, do you have any more tips or suggestion so i cant ask again cuz i might bother someone again which is not good for the busy people around working for the better tomorrow...
    You are not bothering us, my suggestion was only to tell us information about the error you get, because we can't guess and usually as long as we just read some pieces of code we might overlook some common simple to fix errors that we can answer very quickly if you tell the error in the first post.
    And as a suggestion i have only an advice to you: learn a little more C++, i don't want to be rude but it seems C++ is quite a new language for you and if you learn C++ in the same time with Qt it might seem overwhelming - and it might take all the fun out of Qt as a book suggestion i say you search for "Thinking in C++" and you will find two volumes that are free to download.
    Quote Originally Posted by hot_tea View Post
    ...I mean as long as i add this QT += widgets in the .pro file, ill be running both qt 4 and 5, then also i'll goind to read the link you gave to me then nothing more.....
    Well, not really... that will give an error on Qt4, because Qt4 doesn't have the widgets module, but you can use this line: greaterThan(QT_MAJOR_VERSION, 4): QT += widgets in the .pro file, and that will add the widgets module only if Qt major version is higher than 4 so it won't add it for Qt4, it will add it only for Qt5.

    There are other things that changed with version 5, some are in the link that i gave you in my first post and also there are some things where the recommended usage has changed, an example is QThread, in the book you might find a class that is derived from a QThread and run method is overridden, while the recommended usage is presented in the documentation, see here - another recommendation is to use the book to get to know Qt and the basic concepts like: widgets and layouts, parent-child,signals and slots, implicit sharing, but don't forget to use the documentation too, especially because the book about Qt are a little old (don't get me wrong, those are still good but they need a little bit of documentation studying to get the new functionality or the new recommended way to use a functionality)

Similar Threads

  1. Replies: 2
    Last Post: 26th November 2012, 08:09
  2. Replies: 4
    Last Post: 13th November 2012, 21:46
  3. Some QT books
    By sophister in forum Qt Programming
    Replies: 6
    Last Post: 10th May 2009, 13:31
  4. Problem with a UDP connection between two programs
    By fraubrj in forum Qt Programming
    Replies: 8
    Last Post: 10th January 2009, 13:54
  5. Problem about timer in multithread programs
    By vql in forum General Programming
    Replies: 4
    Last Post: 17th October 2007, 15:00

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
  •  
Qt is a trademark of The Qt Company.