Как узнать, какая версия Qt используется в Linux Mint 17.x?
Я новичок в Linux и поддерживаю приложение, работающее на Mint 17.x. В приложении есть ошибка, которая, похоже, связана со старой версией Qt 5.
Как я могу узнать, какая версия Qt 5 установлена на только что созданной машине Mint 17.x?
3 ответа
Я довольно новичок в Linux и поддерживаю приложение, которое работает на Mint 17.x. Приложение имеет ошибку, которая, кажется, связана со старой версией QT 5.
У меня нет мяты, но что я пытался на Debian Jessie, впервые ищет каталог QT через
ls /usr/share/ | grep qt
Затем я перешел в каталог / usr / share / qt5. Оттуда я сделал
grep -r «QtCore 5»
Я нашел матч в /usr/share/qt5/doc/qtcore.qch/
Открыв файл в vim (или в любом другом редакторе, который вы предпочитаете), я поискал «QtCore 5», чтобы найти основную версию. Я нашел несколько упоминаний QtCore 5.3, но ни одного упоминания «QtCore 5.1», «QtCore 5.2» или «QtCore 5.4». Чтобы найти дополнительную версию, я искал варианты «project.qtcore.53X», где X — это дополнительный номер версии. Я нашел «project.qtcore.532», но не нашел другого варианта.
Обратите внимание, что для поиска в vim вам нужно будет использовать символ «\», чтобы экранировать «.» регулярное выражение.
Вывод версии Qt в программе.

Это был срочный багфикс. Рассылку можно с попкорном читать было, если инересно — вот.

-1, -2 — это срочные багфиксы, а не версии Qt, когда разрабы выкатывают пакет Qt, а он тупо не работает должным образом.
Они походу вообще нихера не тестируют.
М-да уж. Все-таки было бы удобнее, чтобы из программы можно было видеть этот номер.
не, обычно добавляют суффикс "(*какая-то цифра*)" к файлу.

А можно ли получить еще суффикс "-1" в случае версии из установочного файла qt-opensource-linux-x64-5.6.1-1.run.
Нет, потому что нет такой верси
И второй вопрос, почему добавляют этот суффикс, а не увеличивают младший номер версии?
Это косяк. В 5.6.1 обнаружили критический баг в одном из модулей, но релизить 5.6.2 с соблюдением процедуры времени не было. Обещают, что больше такое не повторится.
How to find Version of Qt?
How do I know which version of Qt I am using? When I open Qt Creator it shows «Welcome to Qt Creator 2.3». In the build setting, however, it shows Qt Version 4.7.1.
![]()
8 Answers 8
Starting with Qt 5.3 you can use:
This prints a bunch of useful information. The first line includes the version:
All the version info is in PyQt5.Qt:
The functions can be called too:
![]()
![]()
You are using Qt version 4.7.1, because that is the version of the qmake. You can also from shell type qmake -v to get it. The other version, namely 2.3, is the version of Qt Creator, not of Qt
my usual starting point to investigate which software is installed is with
you should get a list of installed packages. Then with
you get a list of installed files for that package
![]()
QT_SELECT=4 qmake -v
QT_SELECT=5 qmake -v
If you’re using Python:
If you’re using C++:
![]()
You can use qmake -query QT_VERSION:
-
The Overflow Blog
Linked
Related
Hot Network Questions
Subscribe to RSS
To subscribe to this RSS feed, copy and paste this URL into your RSS reader.
Site design / logo © 2023 Stack Exchange Inc; user contributions licensed under CC BY-SA . rev 2023.3.13.43306
By clicking “Accept all cookies”, you agree Stack Exchange can store cookies on your device and disclose information in accordance with our Cookie Policy.
Linux Mint Forums
I noticed that some software refer to a Qt version requirement. I wanted to check the QT version for Cinnamon 17.2 because Master PDF editor says, Requirements: Qt 5.2.1 or later: https://code-industry.net/free-pdf-edit . x&ver=3630
Does this result means I’m running qt4 and I won’t be able to install MPdf?
thanks for any help.
Re: How to check for Qt version
Post by richyrich » Mon Jul 11, 2016 9:03 pm
Please read my recent reply to this member . . (the same Qt5 files mentioned in my reply are also in Synaptic Package Manager)
Re: How to check for Qt version
Post by xdicey » Mon Jul 11, 2016 10:23 pm
Thanks richyrich. None of these are installed: qt4-default, qt4-qmake or qt5-default, qt5-qmake
Based on that, can I assume then that neither one is necessary to run Master PDF?
My primary concern is whether or not I should do anything about that Qt5.2.1 requirement?
Re: How to check for Qt version
Post by richyrich » Mon Jul 11, 2016 11:38 pm
Re: How to check for Qt version
Post by BenTrabetere » Tue Jul 12, 2016 12:07 am
I use Master PDF Editor v3.7.10, and according to Synaptic the only Qt5 packages I have installed are:
libaccounts-qt5-1 version= 1.1+1404.20140410.1-0ubuntu1
libsignon-qt5-1 version= 8.56+14.04.20140307-0ubuntu2
I installed it over the Qt4 edition of v3.6.0, and I have not suffered any ill-effects.
Re: How to check for Qt version
Post by xdicey » Tue Jul 12, 2016 1:38 am
Oh, it’s not that I don’t want to install qt5, I will of course. I was just ‘pondering the peach before I eat it’.
That is, I wondered how MPdf has been working without qt4 or qt5 installed, except for, (like Ben Trabetere)
libaccounts-qt5-1 version= 1.1+1404.20140410.1-0ubuntu1
libsignon-qt5-1 version= 8.56+14.04.20140307-0ubuntu2 and in my case
qtchooser version — 39-4717841-3 as well.
Anyway, thanks to both of you for explaining. Now I know a bit about the reason for QTs .