Thilo Cestonaro
Thilo Cestonaro

Reputation: 310

Howto retrieve the running qt version in qt5?

I want to know the version of Qt my app is currently running with?

Not the aboutQt Dialog of QMessageBox or QApplication!

Is there a string or a int which defines the Qt version? Or any API call?

I'm using Qt 5.4.1.

Thanks!

Upvotes: 1

Views: 1405

Answers (1)

Manuel Barbe
Manuel Barbe

Reputation: 2164

You may use the global qVersion function: http://doc.qt.io/qt-5/qtglobal.html#qVersion

const char * qVersion()

Returns the version number of Qt at run-time as a string (for example, "4.1.2"). This may be a different version than the version the application was compiled against.

Upvotes: 3

Related Questions