| View previous topic :: View next topic |
| Author |
Message |
brilliant
Joined: 28 Aug 2009 Posts: 1
|
Posted: Fri Aug 28, 2009 4:44 am Post subject: Qt on Mac problem |
|
|
I have NetBeans and Qt installed my mac running OS 10.5.8. While I can create a Qt form, I can not view it in Qt Designer within NetBeans. When I try to open the form, I get a and error
Unable to run "designer." Do you have Qt directory in the PATH. I have tried changing the PATH environment variable from Terminal, but I have not solve the problem. Has anyone else seen this issue?
|
|
| Back to top |
|
 |
Vladimir Voskresensky Posted via mailing list.
|
Posted: Sat Aug 29, 2009 4:23 pm Post subject: Qt on Mac problem |
|
|
brilliant wrote:
| Quote: | I have NetBeans and Qt installed my mac running OS 10.5.8. While I can create a Qt form, I can not view it in Qt Designer within NetBeans. When I try to open the form, I get a and error
Unable to run "designer." Do you have Qt directory in the PATH. I have tried changing the PATH environment variable from Terminal, but I have not solve the problem. Has anyone else seen this issue?
| after changing PATH in terminal. Have you restarted NetBeans from this
terminal to pick up your new PATH?
Thanks,
Vladimir.
|
|
| Back to top |
|
 |
Valeriy Soldatov Posted via mailing list.
|
Posted: Mon Aug 31, 2009 9:18 am Post subject: Qt on Mac problem |
|
|
Can you try this command: export
PATH=$PATH:/Developer/Applications/Qt/Designer.app/Contents/MacOS
| Quote: |
brilliant wrote:
| Quote: | I have NetBeans and Qt installed my mac running OS 10.5.8. While I
can create a Qt form, I can not view it in Qt Designer within
NetBeans. When I try to open the form, I get a and error
Unable to run "designer." Do you have Qt directory in the PATH. I
have tried changing the PATH environment variable from Terminal, but
I have not solve the problem. Has anyone else seen this issue?
| after changing PATH in terminal. Have you restarted NetBeans from this
terminal to pick up your new PATH?
Thanks,
Vladimir.
|
|
|
| Back to top |
|
 |
dabitbol
Joined: 31 Aug 2009 Posts: 4
|
Posted: Mon Aug 31, 2009 12:26 pm Post subject: |
|
|
I have same issue. I ve made on Terminal
[dabitbol]$ vi .profile
I filled the following line.
export $PATH:/Developer/Applications/Qt
Then
- I rebooted my computer
- I checked that the PATH variable was properly set and it was ok by doing a
echo $PATH
But I still have the same trouble as you on mac os x 10.5.8. with netbeans 6.7
When I open the file out of netbeans ie directly from the finder, I have no issue as it opens quickly .
But from whithin Netbeans, i get same error "unable to run designer ..."
I dont understand Valeriy's answer about PATH=$PATH:/Developer/Applications/Qt/Designer.app/Contents/MacOS because Designer.app is not a directory but a real application file
Thanks for any help.
|
|
| Back to top |
|
 |
Valeriy Soldatov Posted via mailing list.
|
Posted: Mon Aug 31, 2009 5:53 pm Post subject: Qt on Mac problem |
|
|
| Quote: | I dont understand Valeriy's answer about PATH=$PATH:/Developer/Applications/Qt/Designer.app/Contents/MacOS because Designer.app is not a directory but a real application fil
| It is a application, but it is a directory also. NetBeans can't launch
standard MacOS applications, but it can start executable file from a
directory.
From
http://developer.apple.com/mac/library/documentation/CoreFoundation/Conceptual/CFBundles/BundleTypes/BundleTypes.html#//apple_ref/doc/uid/10000123i-CH101-SW1
The Structure of a Mac OS X Application Bundle
The basic structure of a Mac OS X application bundle is very simple. At
the top-level of the bundle is a directory named Contents. This
directory contains everything, including the resources, executable code,
private frameworks, private plug-ins, and support files needed by the
application. While the Contents directory might seem superfluous, it
identifies the bundle as a modern-style bundle and separates it from
document and legacy bundle types found in earlier versions of Mac OS.
Listing 2-3 The basic structure of a Mac OS X application
MyApp.app/
Contents/
Info.plist
MacOS/
Resources/
MacOS directory:
(Required) Contains the application
|
|
| Back to top |
|
 |
dabitbol
Joined: 31 Aug 2009 Posts: 4
|
Posted: Mon Aug 31, 2009 8:54 pm Post subject: |
|
|
Hello Valeriy
thanks for your explanations. So i ve set the path as you said in my .profile
and I ve done this to launch netbeans from terminal as you proposed
(dabitbol)$ pwd
/Volumes/Macintosh HD/Volumes/Macintosh HD/Applications/NetBeans
(dabitbol)$ echo $PATH
/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/Developer/
Applications/Qt/Designer.app/Contents/MacOS
(dabitbol)$ open NetBeans\ 6.7.1.app/
Then once Netbeans was opened, I could open the ui file with Qt designer from within Netbeans . So your solution worked .Thank you (I guess that it could even work with path set to /Developer/Applications/Qt/ only but I will test later)
However, If I launch Netbeans from the Dock or the Applications folder from the finder by clicking on the app, i have still the same issue...
any idea why the $PATH is not taken into account when I launch
from the Dock ?
How to fix this ?
Thank you very much
|
|
| Back to top |
|
 |
dabitbol
Joined: 31 Aug 2009 Posts: 4
|
Posted: Mon Aug 31, 2009 10:13 pm Post subject: |
|
|
Ok actually setting the PATH this way in .profile file will make path available to netbeans only when it is launched from terminal command line , but not from finder or any Mac OS X GUI.
Nevertheless, the nicer and cleaner way is to make this path available for all users by writing a Netbeans file under /etc/paths.d/ in the following way
(dabitbol)$ cd /etc/paths.d
(dabitbol)$ sudo
(dabitbol)$ password: <enter your admin password>
(dabitbol)$ vim Netbeans
then copy
/Developer/Applications/Qt/Designer.app/Contents/MacOS
inside this file
Save it and you re done.
You can get rid now of /Users/dabitbol/.profile file where dabitbol is actually my username ( put yours instead)
Anyway , it still does not solve the issue about launching Netbeans from the finder.
|
|
| Back to top |
|
 |
dabitbol
Joined: 31 Aug 2009 Posts: 4
|
Posted: Mon Aug 31, 2009 11:19 pm Post subject: |
|
|
Now you can create a shortcut to launch the application from the desktop by making an Apple Script
From finder , click on ScriptEditor.app in AppleScript folder
enter the following text
| Quote: |
tell application "Terminal"
do script with command "open '/Applications/NetBeans/NetBeans 6.7.1.app'"
end tell
|
save it as application , executable on your desktop
now click on it . Netbeans will open and you will able to launch Qt Designer from it.
Actually this app will call terminal , thus loading the Path we have previously set , and the terminal will open Netbeans with it
if you dont want to create /etc/paths.d/Netbeans file we have previously talked about in a previous post, just add the export command in your apple script
| Quote: |
tell application "Terminal"
do script with command "export PATH=$PATH:/Developer/Applications/Qt/Designer.app/Contents/MacOS; open '/Applications/NetBeans/NetBeans 6.7.1.app'"
end tell
|
|
|
| Back to top |
|
 |
invlol
Joined: 15 Dec 2009 Posts: 1
|
Posted: Tue Dec 15, 2009 7:46 pm Post subject: Solved |
|
|
I dont know is Netbenas 6.8 solve this, i have the same problem to unabble open designer in 6.7.1 and whit dabidbol post it work but i dont want to open netbeans whit script so i search about PATH in mac because i dont have any .profile i have to created and even open designer.
I see the path in terminal:
echo $PATH
/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/Developer/Applications/Qt/Designer.app/Contents/MacOS:/usr/X11/bin
and designer still dont open..
i find a soution without make the script for run Netbeans:
Open terminal
cd /Users/NAME_OF_USER
mkdir .MacOSX
cd .MacOSX
touch environment.plist
open environment.plist
under root create PATH and put all PATH like in the picture
restart ur computer
and done!
i dont know if anyone have this problem but i want to share my solution,
if it good or bad well its on you.
| Description: |
|
| Filesize: |
26.05 KB |
| Viewed: |
9843 Time(s) |

|
|
|
| Back to top |
|
 |
Alexey Vladykin Posted via mailing list.
|
|
| Back to top |
|
 |
apo2
Joined: 22 May 2011 Posts: 4
|
Posted: Sun May 22, 2011 2:52 am Post subject: |
|
|
| Valeriy's export command worked great for me. Thanks for the help!
|
|
| Back to top |
|
 |
robertcohang
Joined: 29 May 2011 Posts: 3
|
Posted: Sun May 29, 2011 3:44 am Post subject: |
|
|
Had the same problem, thanks for the help!
|
|
| Back to top |
|
 |
esmer
Joined: 31 Jan 2012 Posts: 3
|
Posted: Tue Jan 31, 2012 9:03 am Post subject: |
|
|
i am new to Qt and trying to learn it and so i have installed the sdk 4.7.0 on MacOS Leopard successfully but i just gave a shot to try a simple Hello World from the Book “GUI programming with C++” but it cant build the program it gives me an error message. cell phone spy software Thank you for the assistance! Now solved.
Last edited by esmer on Mon Mar 26, 2012 6:51 am; edited 1 time in total |
|
| Back to top |
|
 |
Sprites
Joined: 06 Feb 2012 Posts: 3
|
Posted: Mon Feb 06, 2012 8:43 am Post subject: |
|
|
| I had the same problem whem I installed Qt on Mac (if memory doenst fail me I think it was that same error). But after I install the IPhone SDK, Qt programs started to compile and run fine. I dont know why, but it solve it.
|
|
| Back to top |
|
 |
|