Avidemux Forum

Avidemux => Main version 2.6 => Topic started by: mean on February 08, 2015, 03:56:23 PM

Title: QT4 & QT5
Post by: mean on February 08, 2015, 03:56:23 PM
Current git can be built using either QT4 and QT5
QT5 works slightly worse as some needed functions have been obsoleted
Important : dont mix them, you'll have issue, especially plugins
Title: Re: QT4 & QT5
Post by: sl1pkn07 on February 08, 2015, 05:01:58 PM
How to switch between both?  if have Qt4 and Qt5 in same time
Title: Re: QT4 & QT5
Post by: Jan Gruuthuse on February 08, 2015, 06:00:45 PM
QuoteThe Qt Chooser provides a wrapper to switch between versions of Qt
development binaries when multiple versions like 4 and 5 are installed
or local Qt builds are to be used.

If you wish to use Qt development binaries with the default PATH and
without special parameters, you need to additionally install either
qt4-default or qt5-default package to provide the default configuration.

Probably your partial answer: http://manpages.ubuntu.com/manpages/utopic/man1/qtchooser.1.html
Title: Re: QT4 & QT5
Post by: sl1pkn07 on February 08, 2015, 06:27:41 PM
yes. i know. QT_SELECT=4 or QT_SELECT=5 make nothing

cmake always prefeer Qt4 over Qt5

i mean, always search first Qt4 and if not found, search Qt5. but howto select directly Qt5?

-DQT4=OFF directly fail


- Checking Qt
-- Checking for Qt 4
-- *****************
Disabled per request


CMake Error at CMakeLists.txt:19 (MESSAGE):
  Qt NOT FOUND


-- Configuring incomplete, errors occurred!
Title: Re: QT4 & QT5
Post by: Jan Gruuthuse on February 09, 2015, 08:13:57 AM
Have you installed qt5-default? My understanding for now: you either have qt4-default or qt5-default installed to show preference? (not both)
qt5-default
QuoteThis package sets Qt 5 to be the default Qt version to be used when
using development binaries like qmake. It provides a default
configuration for qtchooser, but does not prevent alternative Qt
installations from being used.
Title: Re: QT4 & QT5
Post by: sl1pkn07 on February 09, 2015, 03:55:19 PM
Have a installed BOTH Qt versions, 'qt5-default' or 'qt4-default' don't exist in Archlinux, that is select by QT_SELECT=4 or QT_SELECT=5


â”Å'â”â,¬Ã¢â€Â¤[$]|[sl1pkn07]|[sL1pKn07]|[/usr/lib]|
â””â”â,¬Ã¢â€â,¬Ã¢â€â,¬Ã¢â€¢Â¼  qtchooser
Usage:
  qtchooser { -l | -list-versions | -print-env }
  qtchooser -install [-f] [-local] <name> <path-to-qmake>
  qtchooser -run-tool=<tool name> [-qt=<Qt version>] [program arguments]
  <executable name> [-qt=<Qt version>] [program arguments]

Environment variables accepted:
QTCHOOSER_RUNTOOL  name of the tool to be run (same as the -run-tool argument)
QT_SELECT          version of Qt to be run (same as the -qt argument)

â”Å'â”â,¬Ã¢â€Â¤[$]|[sl1pkn07]|[sL1pKn07]|[/usr/lib]|
â””â”â,¬Ã¢â€â,¬Ã¢â€â,¬Ã¢â€¢Â¼  qtchooser -l
4
5
default
â”Å'â”â,¬Ã¢â€Â¤[$]|[sl1pkn07]|[sL1pKn07]|[/usr/lib]|
â””â”â,¬Ã¢â€â,¬Ã¢â€â,¬Ã¢â€¢Â¼  qtchooser -print-env
QT_SELECT="default"
QTTOOLDIR="/usr/lib/qt/bin"
QTLIBDIR="/usr/lib"
â”Å'â”â,¬Ã¢â€Â¤[$]|[sl1pkn07]|[sL1pKn07]|[/usr/lib]|
â””â”â,¬Ã¢â€â,¬Ã¢â€â,¬Ã¢â€¢Â¼  QT_SELECT=4 qtchooser -print-env
QT_SELECT="4"
QTTOOLDIR="/usr/lib/qt4/bin"
QTLIBDIR="/usr/lib"
â”Å'â”â,¬Ã¢â€Â¤[$]|[sl1pkn07]|[sL1pKn07]|[/usr/lib]|
â””â”â,¬Ã¢â€â,¬Ã¢â€â,¬Ã¢â€¢Â¼  QT_SELECT=default qtchooser -print-env
QT_SELECT="default"
QTTOOLDIR="/usr/lib/qt/bin"
QTLIBDIR="/usr/lib"
â”Å'â”â,¬Ã¢â€Â¤[$]|[sl1pkn07]|[sL1pKn07]|[/usr/lib]|
â””â”â,¬Ã¢â€â,¬Ã¢â€â,¬Ã¢â€¢Â¼ 


by default is Qt5 installation. but the Cmake search first the Qt4 installation, and then (if not found Qt4) search Qt5, but as found Qt4 first ...
Title: Re: QT4 & QT5
Post by: Jan Gruuthuse on February 09, 2015, 04:24:17 PM
Is this of any help to you:
Using configuration files: https://wiki.archlinux.org/index.php/qt#Default_Qt_toolkit
Title: Re: QT4 & QT5
Post by: sl1pkn07 on February 09, 2015, 09:03:32 PM

â””â”â,¬Ã¢â€â,¬Ã¢â€â,¬Ã¢â€¢Â¼  ls /etc/xdg/qtchooser/
total 16
drwxr-xr-x  2 root root 4096 dic 13 20:29 .
drwxr-xr-x 11 root root 4096 feb  8 14:55 ..
-rw-r--r--  1 root root   26 dic 13 18:50 4.conf
-rw-r--r--  1 root root   25 dic 13 18:50 5.conf
lrwxrwxrwx  1 root root   25 dic 13 18:50 default.conf -> /etc/xdg/qtchooser/5.conf


still search qt4 (with expected behavior: found it), but cannot swich to search Qt5 directly

I need for package management. user side config not allowed (like you arch wiki solution)(because all users hace their own config)

https://aur.archlinux.org/packages/avidemux-git/ (without support last git Qt5 changes)

greetings
Title: Re: QT4 & QT5
Post by: mean on February 10, 2015, 06:35:43 AM
edit cmake/admCheckQt5.cmake
and remove the
   SET(QT5_CHECKED 1)
That is at line 4
Title: Re: QT4 & QT5
Post by: sl1pkn07 on February 10, 2015, 03:58:32 PM
Thanks Mean. now can build the Qt5 version when have installed both Qts (Qt4/Qt5) in same time

is possible add a Qt selector as cmake flag?

for example add -DUSE_QT=4/-DUSE_QT=5 for use one or other?

greetings
Title: Re: QT4 & QT5
Post by: mean on February 10, 2015, 06:12:03 PM
yes, it is on the todo list + repair translations
The QT5 as of now might work worse than qt4 with regard to display
Title: Re: QT4 & QT5
Post by: sl1pkn07 on February 10, 2015, 10:05:21 PM
oks. thanks for your effort

greetings