How to install QtDesigner? - qt

I just installed Qt 5.4.1 on Windows 7. And there is no QtDesigner. Also there is no QtDesigner in MaintenanceTool.
How can I install it?

You can install and find QT Designer as follows (Windows environment):
Install latest QT (I'm using 5.8) from QT main site
Make sure you include "Qt 5.8 MinGW" component
QT Designer will be installed in C:\Qt\5.8\mingw53_32\bin\designer.exe
Note that the executable is named "designer.exe"
UPDATE - there is an easier way to install QT Designer without downloading GB's of data from QT:
Install the latest version of "pyqt5-tools" using pip install pyqt5-tools --pre
The "designer.exe" will be installed in ...Lib\site-packages\pyqt5_tools

If you are on macOS and use brew you may have installed qt already using brews installer.
In that case you already have QT Designer installed even though it is not mentioned anywhere.
You can find it here: /usr/local/Cellar/qt/<qtversion>/libexec/Designer.app
So to place it in your local apps folder you can create a symlink to it like this:
ln -sf /usr/local/Cellar/qt/5.11.1/libexec/Designer.app ~/Applications/.

Install QtDesigner on windows:
https://build-system.fman.io/qt-designer-download
install designer on Linux:
It can be installed using the apt package manager
sudo apt-get install python-qt4 qt4-designer
run the command designer and it will work for you
if it doesn't try /usr/bin/designer
it worked for me
i am using python 3.6 with pyqt-5.16

It is there. Create a form, click on the .ui file and it opens automatically.

Install the latest version of "pyqt5-tools" using pip install pyqt5-tools --pre
Then run the command (designer.exe) then you are good

pip install pyqt5-tools
refer: https://pypi.org/project/PyQt5Designer/
run the following commands in the given sequence
pip install PyQt5Designer
designer.exe
then press Enter. This opens Qt Designer window.

Expanding StonyBoy answer.
If you are on macOS, you have installed Qt5 with brew, and you want to access the Qt5 Designer app via command line (like on Linux), you can set a symlink to the actual executable as well, like this:
ln -sf /usr/local/Cellar/qt/5.13.1/libexec/Designer.app/Contents/MacOS/Designer /usr/local/opt/qt/bin/designer
This way, the designer command will be placed in the bin folder, together with the other Qt5 executables (as qmake). Thus, you will be able to launch it simply by typing designer in your shell.
Note: of course you must have the path of the Qt5 bin/ folder added to your PATH environmental variable, for being able to directly call designer in the shell. But brew added it for you when you installed Qt5.

I got pyqt5 installed along with the tools when I pip install pyqt5-tools. If you prefer PySide2, qt-tools will work better. You can emulate a "dry-run" by creating a fresh, disposable virtual environment to test on. Obvious, I know, but I use them infrequently enough that it takes me a while to remember sometimes :)

As of January 2023, the official Qt website does not provide Qt Designer as a standalone Application. Qt Designer can be obtained from:
Official source
Qt Creator + Qt base package
Offline installer for Qt Creator (Qt account required, has integrated Designer)
Qt base package
Online installer (Qt account required)
Custom Installation, select component
Qt-->{Qt Version of choice}-->{Architecture (usually MSVC 64-bit / Mingw64)}
aqtinstall (NO account needed)
In all official installations, the standalone designer.exe is located in the Qt bin folder (for Windows usually C:\Qt\{Version}\{Architecture}\bin).
Third party standalone applications
(potentially outdated)
https://github.com/mherrmann/fbs
(small file size)
From PyPi via pip
pyqt6-tools, pyqt5-tools, pyqt-tools, PyQt5Designer
For Qt newcomers, using Designer in Creator may be the better choice as it is very straightforward. Advanced users looking to set up a custom build infrastructure may be interested in aqtinstall instead.

I found it here:
..\Lib\site-packages\qt5_applications\Qt\bin

Related

Make Qt Creator to see examples and docs

I build Qt 5.9.1 from sources, downloaded from www.qt.io, on Ubuntu 16.04.3. I use -make examples for configure script when I build Qt.
After installation in default prefix /usr/local there is a /usr/local/Qt-5.9.1/examples/ and /usr/local/Qt-5.9.1/doc/.
Also I have installed Qt Creator 4.3.1 from the official site.
On the "Welcome" page of Qt Creator in "Examples" I see auto-detected "Qt 5.9.1 in PATH (Qt-5.9.1)" entry in combobox (on another installation I even don't see this entry - combobox is empty). And no one icon of the examples itself. Typing any sensible keywords into search box does nothing.
When I open my (perfetcly buildable) project and hit F1 on any Qt class name, I expect to see a help on it in the right split window. Then nothing happens, but only "No documentation avaliable." text is shown.
qmake of installed Qt is in the PATH and there is QTDIR=/usr/local/Qt-5.9.1 in /etc/environment.
How to make Qt Creator to see docs, examples and demos from auto-detected Qt installation?
In case someone installed qtcreator from the Ubuntu packages the examples can be installed in the following way:
sudo apt-get install qtbase5-examples qtbase5-doc-html
This will show the basic widget examples.
Additional examples (e.g. qt quick) can be added by installing them explicitly:
sudo apt install qtquickcontrols2-5-examples
To actually get them displayed in qtcreator I had to install:
sudo apt install qt5-doc qt5-doc-html
Edit:
Also make sure to install the qml modules you need, for example:
sudo apt install qml-module-qtquick-controls2
Select Tools → Options → Help → Documentation in Qt Creator and add *.qch files from /usr/local/Qt-5.9.1/doc/ (and possibly from /usr/local/Qt-5.9.1/examples/ ?).

Where can I download qmlscene for Ubuntu

MMMMMM#unbuntu:~/QT/test4Qml$ qmlscene main.qml
qmlscene: could not exec '/usr/lib/x86_64-linux-gnu/qt4/bin/qmlscene': No such file or directory
My Qt Development Environment does not have qmlscene. I googled it, and I only found *.deb. How should I do it?
As far as I know, Qt is not installed by default in /usr/lib/x86_64-linux-gnu/qt4. That directory is the default path when linux detects a dependency which requires Qt.
Where did you installed Qt? How did you installed it? Did you set the PATH environment variable to where Qt binaries are installed?
Usually, you have to follow the next steps:
1.- Install the the basic requirements for building Qt applications.
2.- Download Qt. I recommend Qt 5 using an offline installer. Otherwise, you'd need to compile from the source. Here you have a list of older versions of Qt.
3.- Set the environment variable PATH to the directory where you Qt bin directory is installed.

Get Qt5 up and running on a new Mac

Coming from Ubuntu I bought a new iMac and tried to setup my Qt development. Everything else is already up and running. Xcode command line tools are also installed.
Because it surprised me how good brewand brew caskworked I wanted to install Qt5with them. On the one side it is very fast and I do not have to got to any homepage in order to download it. On the other side I do not have to care about the installation directory. Having multiple version installed should also be a lot simpler though.
I used the following commands:
brew install qt5
brew cask install qt-creator
Qt5 is now installed under /usr/local/Cellar/qt5/5.4.1. I also added the bin folder to my path (done in .bash_profile). QtCreator, Linguist and all the other applications are shown in my launchpad. But unfortunately, it is still not done.
QtCreator says that no version of Qt is known. I tried to add qmake but I was not able to navigate to the folder mentioned above.
Could anybody give me a hint on how to fix this issue? Installing qt via installer should be the last option.
I had similar issue with Qt Creator, now on Mac GUI applications do not have access to environmental variables (in previous versions it was different).
You need to setup path to qmake in Qt Creator manually using Command-Shift-G in Finder to navigate to Folder you need.
Another option is to use brew link qt5 --force, which will symlink the various Qt5 binaries and libraries into your /usr/local/bin and /usr/local/lib directories. This will give you qmake at the command line, without requiring you to add anything special to your path in .bash_profile. The main reason this isn't done by default is that Qt4 is also somewhat popular.
It could get a little messy, but if you need to install Qt4 as well, you can unlink Qt5 at any time, by doing brew unlink qt5, and it will keep the installation intact. Then do brew install qt to get Qt4, which unlike the brew installation for Qt5 will indeed create the links directly into /usr/local without you having to manually do brew link qt. You can unlink Qt4 and relink Qt5 (or vice-versa) whenever you need to switch.
In my cases I needed to set it in Preferences => QT Versions => Add. Environment variables also did not help. Small popup when starting app also did not work.
I use command like this:
brew install qt#5
and. success install qt5 by brew.

How to run a Qt application on a system where Qt is not installed?

I have made an application using QtWebKit, Qt4. I have the binary generated in Fedora 16. Now, I want to run that application on another PC (running some other Fedora version), where Qt is not installed. How can I package my Qt application so that it can run on a platform where Qt is not installed? Is there any command line utility as well as QtCreator utility to do so. I have tried "deploy all" command, but it didn't have any affect.
Create an Installer with the Qt Installer Framework and just supply all needed shared libraries (Win/OSX) or compile statically. Under Linux there is always the problem between system-wide libraries or bundled libraries. The documentation https://qt-project.org/doc/qt-5.0/qtdoc/deployment.html should give you a good start
Obviously, you need to have access to the qt libraries, which are exactly the same version that you used to compile your application.
There are two options :
link qt libraries statically
create a RPM package (see this how)
Also check Deploying Qt Applications.
Since you're deploying using rpm, to systems where Qt 4 rpms are available, you don't need to do anything besides simply adding a dependency on the qt to your rpm's specfile. The user installing your package using yum localinstall will get the Qt dependencies automatically installed. That's the correct way of doing it - it will keep your package size small.
Of course you need a separate rpm build for every fedora/centos major version out there, but that's almost always a requirement.
If your package needs newer Qt version than the one provided by the platform packages, you can still make a specific version dependency (say qt >= 4.7.0) and have a readme that indicates that newer packages can be obtained from a 3rd party repository (epel etc.)
For deployment under Linux I've used Bitrock Installer Tool.
The main thing before deploying is to check your dependencies. You can do that by using command:
ldd appName | grep libQt
After that you'll see list of dependencies. You'll have to set environment variable LD_LIBRARY_PATH to let linker know where're your libraries. To do that:
export LD_LIBRARY_PATH=.
. means current directory
And after that:
./appName $*
After that you'll be able to use your executable with Bitrock Installer Tool.

qtcreator examples not enabled

I installed qtcreator on a Ubuntu 11.10
sudo apt-get install qtcreator
the versions installed are: QT Creator 2.2.1, QT 4.7.3
When i start qtcreator, to explore QT C++ examples the button is greyed out/disabled and it says Examples not installed.
Neither does qtdemo show any demo/documentation?
Do i have to install examples, doc separately? If yes, how?
How can i enable examples in qtcreator and documentation in qtdemo?
EDIT:
In response to one answer below from #Murtuza Kabul, I tried many things to point qtcreator to correct qt but could not. So I did uninstall qtcreator and qt-sdk and reinstalled qt-sdk. So now qtcreator is what comes with qt-sdk . It still says examples not installed.
I downloaded Qt 5.1 directly from qt-project.org and installed as admin (with sudo) on Linux Mint 12 (based on Ubuntu).
If I started qtcreator as normal user I didn't have examples but if started qtcreator as admin (with sudo) I had all examples.
My problem was with examples folder privilages. It was the only folder without read/execute privilage for all users (/opt/Qt5.1.0/5.1.0/gcc/examples). All other folders inside (and outside) examples had privilages for all users.
EDIT:
I forgot to say - as HostileFork mentioned in comment - sudo chown -R +rx /opt/Qt/5.1.0/gcc/examples was solution to this problem.
EDIT:
As noted by Climax - it should be chmod instead of chown
sudo chmod -R +rx /opt/Qt/5.1.0/gcc/examples
You also need to install qtsdk. It comes with the examples and binaries required to run the qt project. If you install the sdk, it will provide you an interface to update the sdk and install/uninstall different parts of the sdk whereby you will be able to choose if you want to install the examples or not
Install the qt4-demos package.
sudo apt-get install qt4-demos
I found the sample code installed in /usr/lib/qt4/demos/. Also the qtdemo program was installed at /usr/lib/x86_64-linux-gnu/qt4/bin/qtdemo.
It seems only a limited set of examples are installed by this package.
I had the same problem on Windows 7.
How I solved this:
I open QT Creator.
I select menu-option [Tools]
From there I select [Options...]
From there I select the [Kits] option on the left-hand side
I select the tab [QT Versions]
I click The [Add...] button: to add the QT version that I am using...
... I am presented with a windows-explorer screen to select something...
... I go to the main directory on which QT is installed (in my case: C:\Qt)...
... In the explorer "Search" I enter qmake (without the quotes)...
... There is a single qmake EXECUTABLE file displayed - I double-click it!...
... I press [Apply], then [OK].
Walla - it works! I now have examples!

Resources