Qt: Difference between revisions

imported>Milahu
qt5to6: add links to qt.io
imported>Milahu
+ Conditional blocks in qmake *.pro files
Line 145: Line 145:
Maybe add libraries like <code>qtwayland</code>
Maybe add libraries like <code>qtwayland</code>


See also: [https://doc.qt.io/qt-6/portingguide.html Porting to Qt 6]
Conditional blocks in qmake <code>*.pro</code> files
 
<syntaxHighlight lang=pro>
lessThan(QT_MAJOR_VERSION, 6) {
  # qt5, qt4, ...
  QT += x11extras
}
equals(QT_MAJOR_VERSION, 6) {
  # qt6
  QT += core-private
}
</syntaxHighlight>
 
See also:
 
* [https://doc.qt.io/qt-6/portingguide.html Porting to Qt 6]
* [https://stackoverflow.com/questions/18663331 How to check the selected version of Qt in a .pro file?]


== Troubleshooting ==
== Troubleshooting ==