6

I'm reading the book "C++ GUI Programming with Qt4", and I've reached the topic of Integrating Custom Widgets with Qt Designer.

I've built the example project outlined there (the icon editor plugin), and I get a file called 'libiconeditorplugin.so', and I've copied it to '/usr/lib/qt4/plugins/designer/'. But when I start Qt Creator I don't see the icon editor widget in the widget box.

The only thing I've done differently from the book is I removed the DESTDIR from the .pro file because it had $QTDIR, and $QTDIR is not defined in my computer and I don't know where it should point. Instead, I copied the .so file manually.

I'm not sure if I've copied the plugin in the right directory, and if libiconeditorplugin.so is the only file that I needed to copy, the book was kind of sketchy on how it should work.

My OS is Ubuntu and I've installed Qt Creator with apt-get.

sashoalm
  • 75,001
  • 122
  • 434
  • 781

1 Answers1

5

Turns out I was copying libiconeditorplugin.so to the wrong directory. I was copying it to "/usr/lib/qt4/plugins/designer/", while Qt Designer was looking in "/usr/lib/x86_64-linux-gnu/qt4/plugins/designer/".

sashoalm
  • 75,001
  • 122
  • 434
  • 781
  • Hi I have the problem with the same file "libiconeditorplugin.so. I've installed my Qt-5.14.2 in /home/itachi/Qt folder, So how can I make that plugin available in Qt designer? Thank you? – Itachi Uchiwa Nov 18 '20 at 23:38
  • Hi, I do not know since I haven't worked with Qt for a while. My advice is to post a new question with the details of your problem. – sashoalm Nov 19 '20 at 06:59