Qt Creator/designer not showing QVTK widget in UBUNTU
-
I'm working on a freshly-installed Ubuntu 14.04.3 system, and I've used the synaptic package manager to install qt4-designer, qtcreator, libvtk5.8-qt4, libvtk5.8 libvtk5-qt4-dev, and libvtk5-dev, as well as anything else snyaptic deemed to be necessary prerequisites. Nothing was git-ted, downloaded, or make-ed, I just used what was in the standard repositories.
Selecting the designer from qtcreator to edit the 'Form', I have the usual assortment of containers and layouts and things, but I do not have a QVTKWidget. Even though everything I've read says that it should be there, it's not. I've copied the /usr/lib/qt4/plugins/designer/libQVTKWidgetPlugin.so file installed by libvtk5-qt4-dev to every directory I've found that people recommend copying it to, but I still don't have a QVTKWidget in the designer.
I know this should work, since I had a QVTKWidget to drag and drop when I was running Ubuntu 12.04. It disappeared after I upgraded to Ubuntu 14.04, never to return. I have a .ui file that was created in 12.04 that contains a QVTKWidget object, and I can clean and remake the project, and everything compiles, links, and runs just fine, so I don't think anything is missing. But the QVTKWidget is no longer there in the list of things I can drag into the design window.
Help! I want my QVTKWidget back!
Thanks in advance,
Steve -
Hi and welcome to devnet,
I'd suspect a Qt 4 vs Qt 5 clash. Your old installation was probably using a Qt 4 base Qt Creator and now you have a Qt 5 based Qt Creator and the plugin looks like for Qt 4.
Do you have libvtk-qt5-dev ?
-
Thanks for the welcome, and that was it! I have both libqt4-designer and libqt5designer5 installed from the repository, but only libvtk5-qt4-dev. When I run the libqt4 'designer', the QVTKWidget is there, but when I run the libqt5 'qtcreator', it's not there.
Which leads me to my next question - is there a version of 'qtcreator' for Qt4 that would give me the source code editing, compiling, etc.. of the Qt5 qtcreator, or is there an easy way to get the Qt5 qtcreator to use the Qt4 libraries and designer? I've searched and found suggestions like "in Qt creator, go to menu tools->Options->Build & Run->Qt Versions, you add Qt4 manually", but I can't find anything in Qt Creator to click on to get a menu with "Tools->Options->..." What am I missing?
I also found a suggestion to install "qt4-default", but after all the fun I've had with my 'upgrade', I'm not quite ready to pull that trigger...
Steve
-
Qt Creator can be used indifferently to build software with Qt 4 or Qt 5. However, Designer/Qt Creator plugins must be built with the same version of Qt as is Qt Creator.
-
Thanks for your help, and I'm sorry if I'm being obtuse, but this is definitely a learning experience.
I assume this means I need a version of Qt Creator based on Qt 4, so is there an easy way to back out of the Qt 5-based qtcreator and install a Qt 4-based qtcreator using synaptic, or would I remove qtcreator using synaptic, then manually find, download and install a previous version of qtcreator, or ...? Alternatively, could both versions of qtcreator peacefully coexist (I'm thinking not)? Synaptic has "Qt Creator 3.0.1 based on Qt 5.2.1" available.
-
AFAIK, there should be no problem having several version of Qt Creator installed.
You could look at the archives of Ubuntu, or build Qt Creator yourself, but I think the latest versions can only be built with Qt 5.