6

There is a bash command that comes with installing PyQT Creator called designer that will run a tool called Qt Designer, found under the Qt Creator package. It helps you create GUIs - pretty cool stuff.

There is a problem though... whenever I run designer, I get this error:

designer: could not exec '/usr/lib/x86_64-linux-gnu/qt4/bin/designer': No such file or directory

And that's great - I don't want it to execute /usr/lib/x86_64-linux-gnu/qt4/bin/designer, I want it to execute /usr/lib/x86_64-linux-gnu/qt5/bin/designer, the difference being between "qt4" (first path) and "qt5" (second path). That's where designer is.

I looked around and found this command type -a (command) and it would tell you where the command definition is "located", if I understand correctly. So I looked it up and got:

$ type -a designer
designer is /usr/bin/designer

But I can't edit that file... it's a bunch of gibberish (side question, what does it mean when a file has no file extension? What does that make it?)

So, my question is, how can I get the command designer to execute /usr/lib/x86_64-linux-gnu/qt5/bin/designer?

Edit: which designer also returns /usr/bin/designer,

also: $ file /usr/bin/designer /usr/bin/designer: symbolic link to qtchooser'

So I also took a look at qtchooser... seems like its a command (not entirely sure what it does).

Here is some output:

file /usr/bin/qtchooser 
/usr/bin/qtchooser: ELF 64-bit LSB  executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.24, BuildID[sha1]=96215e9441b8361f0cc57b37db70fc50752cb05a, stripped
8
  • 1
    You can read about the file extension topic here: askubuntu.com/questions/48019/…. In (IIRC all) Linux systems, files don't have a file extension by default.
    – dessert
    Nov 10, 2017 at 22:47
  • 1
    file /usr/bin/designer to find out what kind of file it is.
    – AlexP
    Nov 10, 2017 at 22:51
  • 1
    Am I right that the output ot which designer is also /usr/bin/designer? Please add the output of file /usr/bin/designer to your question using the formatting tools.
    – dessert
    Nov 10, 2017 at 22:52
  • @dessert made the edits
    – John Lexus
    Nov 10, 2017 at 22:56
  • 2
    OK, so qtchooser doesn't know about QT5 and thinks you have QT4 instead – tricky! If it's just for designer, I'd just define an alias with alias designer=/usr/lib/x86_64-linux-gnu/qt5/bin/designer in the ~/.bash_aliases file.
    – dessert
    Nov 10, 2017 at 22:59

1 Answer 1

4

Thanks to @dessert for helping me out.

I ran sudo apt-get install qt5-default and everything worked fine.

The answer was "inspired" from the answer here, which didn't work for me, but might work for you if you are having the same problem and my solution didnt work.

While this does not directly answer my question... it solves my problem, so yay

1
  • 1
    I know I'm a bit out of time, but I just found this resource which I want to sare. Basically, you can edit /usr/lib/x86_64-linux-gnu/qt-default/qtchooser/default.conf changing the default to /usr/lib/x86_64-linux-gnu/qt5/bin and whenever you call designer it will launch the qt5 one!
    – umbe1987
    Aug 9, 2018 at 20:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.