Announcement

Collapse
No announcement yet.

Qt de

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    #16
    Originally posted by lcorken View Post
    ....

    Still in chapter 1 but I found the examples don’t make using kubuntu 14.10, QT4-QT5 stuff. The solution so far is to add this line to the .pro file:
    QT += widgets

    This site explains it:
    http://qt-project.org/forums/viewthread/23425

    This site shows how to convert example code to QT5 (based on first edition of the book):
    http://www.ics.com/blog/porting-desk...5#.VKlx7fm3W91

    Ken.
    IRCC, QT4.x doesn't have a "widgets" module to add in the pro file, but QT5 does. In QT4 there were modules with "widget" in the name but when you used methods and properties in those modules you had to add the module name to the pro file and regenerate the Makefile. The last msg in that link is in error. Before QtCreator was released it was common to navigate to the top directory in your new project and from a terminal issue

    qmake -project

    One then edited it to include any additional directories, source files and header files that it missed or were later added. Then, running

    qmake projectname.pro

    would produce the Makefile which I could compile with g++. The "qmake -project" command was run only once. After that the programmer had to edit it and rerun "qmake projectname.pro" to regenerate the Makefile after adding new modules, source files, headers and other resources to the pro file.

    When I first began using Qt it was with Qt3. The design paradigm in Qt3 was that QtDesigner was THE design tool for the entire project, if you wanted to do it graphically. That involved adding everything via text, radio buttons, combo boxes, and similar controls in QtDesigner itself. VERY clumsy, very akward and certainly not the classic C++ design paradigm. I was on the verge of dropping Qt3 when Qt4 came out. The difference was like between the Wright Brothers first airplane and an Aerobus 380.
    "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
    – John F. Kennedy, February 26, 1962.

    Comment

    Working...
    X