Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
tools:qt [2022/08/03 04:48] – [Demo] darrontools:qt [2022/08/03 05:01] (current) – [Install] darron
Line 40: Line 40:
  
 __Strip__ __Strip__
 +
 +Due to a problem with WSL1 the Qt5 core library file needs to be stripped.
 +
 <code> <code>
 strip --remove-section=.note.ABI-tag /usr/lib/x86_64-linux-gnu/libQt5Core.so.5 strip --remove-section=.note.ABI-tag /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
Line 45: Line 48:
  
 ==Qt6== ==Qt6==
- 
-This section is incomplete at this time. 
  
 __Base__ __Base__
Line 59: Line 60:
  
 ===Demo=== ===Demo===
 +
 +QT Creator is used to create project files and edit source code.
  
 <code> <code>
 qtcreator qtcreator
 </code> </code>
 +
 +Follow this guide to create a simple project.
  
 <code> <code>
Line 76: Line 81:
 __main.cpp__ __main.cpp__
  
-This is clearly not a good example of a Qt application, just a demo.+This is clearly not a good example of a Qt application, but this code is just a demo.
 <code> <code>
 #include <QCoreApplication> #include <QCoreApplication>
 #include <iostream> #include <iostream>
  
-int main(int argc, char *argv[])+int 
 +main(int argc, char **argv)
 { {
-    QCoreApplication a(argc, argv);+        QCoreApplication App(argc, argv);
  
-    std::cout << "Hello World!\r\n";+        std::cout << "Hello World!" << std::endl; 
 + 
 +        return 0;
 } }
 </code> </code>
 +
 +Qt5 make is used to create a working `Makefile' which is used to build the application.
  
 <code> <code>
Line 95: Line 105:
 Hello World! Hello World!
 </code> </code>
 +
 +To build for Qt6, use qmake6 instead of qmake above.