QT unter Mac

Y

yellow1

Mitglied
Thread Starter
Dabei seit
16.10.2006
Beiträge
23
Reaktionspunkte
0
Hi,
habe einen iMac mit MacOSX10.4.8.
Da ich in der Schule mit QT arebite, wollte ich es mir auch auf meinem Mac instalieren. Also habe ich mir die tar.gz Datei runtergealden und dann auch laut Install-Anleitung installiert. Doch dann stand ich vor dem Problem daß ich keine .profile Datei in meinem Homeverzeichniss habe. Laut anraten einiger Forumnutzer habe ich mir selbst eine .profile Datei erstellt und die folgenden Zeilen darin eingetragen. Diese waren wie folgt:

PATH=/usr/local/Trolltech/Qt-4.2.1/bin:$PATH
export PATH

Anschließend habe ich die Datei gespeichert und wollte mal probieren ob ich
eine Projektdatei erstellen kann. Und schon war das Problem da. Es ging nicht so wie ich wollte. Anscheinend klappt daß mit dem selbst erstellen der .profile Datei.

Kann mir jemand dabei helfen?

Danke
yellow1
 
Mit QT meinst du Quicktime? Wozu willst du das installieren? Das ist doch schon Standartmäßig mit dabei...schau mal in deinen Programm-Ordner.
 
du musst den terminal schon schliessen und noch mal aufmachen, damit die .profile ausgewertet wird...

du kannst dir in der bash doch auch mal $PATH ausgeben lassen...
 
Da ich noch neu in der Macwelt bin habe ich noch nicht rausgefunden wie ich eine Datei mit dem Terminal öffne. Unter Linux habe ich da z.B. einfach
gEdit Dateiname eingegeben. Und wenn ich die Datei mit TextEdit öffnen möchte, zeigt dieser mit leider die verstekcten Dateien nicht an.
Habe mal die Verzeichnisse usr/local/Trolltech/Qt-4.2.1 kontrolliert und da ist alles ordnungsgemäß installiert worden.

Bin ein wenig hilflos.
 
wenn du aus der linux welt kommst, warum kennst du dann keine vernünftigen editoren ;)
probier doch einfach mal nano im terminal, oder wenn du auf S/M stehst: vi ;)
 
mit dem Open-Befehl kann man eine Datei mit dem damit verknüpften Standard-Programm öffnen. Also z.B. open "Text 23.rtf" öffnet den Text "Text 23.rtf" mit TextEdit.
 
So, ich weiß immer noch nicht warum es nicht geht.
Habe mir mal gedacht daß ich mal die Installationsanleitung von Trolltech hier rein poste:

*************************************************************
INSTALLING Qt/Mac Version 4.2.1

Note: If you have obtained a binary package for this platform, consult the
installation instructions provided instead of the ones in this document.

1. If you have the commercial edition of Qt, install your license
file as $HOME/.qt-license.

For the open source version you do not need a license file.

2. Unpack the archive if you have not done so already:

cd /tmp
gunzip qt-mac-opensource-src-4.2.1.tar.gz # uncompress the archive
tar xvf qt-mac-opensource-src-4.2.1.tar # unpack it

This creates the directory /tmp/qt-mac-opensource-src-4.2.1 containing the files
from the archive.

3. Building

To configure the Qt library for your machine type, run the
./configure script in the package directory.

By default, Qt is configured for installation in the
/usr/local/Trolltech/Qt-4.2.1 directory, but this can be
changed by using the -prefix option. Alternatively, the
-prefix-install option can be used to specify a "local"
installation within the source directory.

cd /tmp/qt-mac-opensource-src-4.2.1
./configure

Type "./configure -help" to get a list of all available options.

Note that you will need to specify -universal if you want to
build universal binaries, and also supply a path to the -sdk
option if your development machine has a PowerPC CPU. By default,
Qt is built as a framework, but you can built it as a set of
dynamic libraries (dylibs) by specifying the -no-framework option.

To create the library and compile all the demos, examples, tools,
and tutorials, type:

make

If you did not configure Qt using the -prefix-install option,
you need to install the library, demos, examples, tools, and
tutorials in the appropriate place. To do this, type:

sudo make install

and enter your password, this requires that you have administrator access
to your machine.

If you need to reconfigure and rebuild Qt from the same location,
ensure that all traces of the previous configuration are removed
by entering the build directory and typing

make confclean

before running the configure script again.

NOTE: If you encounter problems with header files having a size of zero and
no permissions, remove these files and try building again. This is typically
encountered when building with multiple jobs, so try running make -j1 instead.
This is a known issue, and should be fixed in an upcoming release.

4. Environment variables

In order to use Qt, some environment variables needs to be
extended.

PATH - to locate qmake, moc and other Qt tools

This is done like this:

In .profile (if your shell is bash), add the following lines:

PATH=/usr/local/Trolltech/Qt-4.2.1/bin:$PATH
export PATH

In .login (in case your shell is csh or tcsh), add the following line:

setenv PATH /usr/local/Trolltech/Qt-4.2.1/bin:$PATH

If you use a different shell, please modify your environment
variables accordingly.

5. That's all. Qt is now installed.

If you are new to Qt, we suggest that you take a look at the demos and
examples to see Qt in action. Run the Qt Examples and Demos either by
typing 'open /usr/local/Trolltech/Qt-4.2.1/bin/qtdemo.app' on the
command line or by double-clicking on the 'qtdemo' icon in the Finder.

You might also want to try the following links:

http://doc.trolltech.com/4.2/how-to-learn-qt.html
http://doc.trolltech.com/4.2/tutorial.html
http://www.trolltech.com/developer

We hope you will enjoy using Qt. Good luck!

*********************************************************
Habe die Punkte 1-3 gut durchlaufen. Nur bei Punkt 4 klappt nichts.

Danke

yellow1
 
Frosty88 schrieb:
Mit QT meinst du Quicktime?

Hallo yellow,

wie Du gesehen hast, denken die Mac-Entwicker bei QT an QuickTime. Wenn Du also das Trolltech Produkt Qt meinst, solltest Du auf Groß-/Kleinschreibung achten

Alex
 
entweder im term:
export PATH=/usr/local/Trolltech/Qt-4.2.1/bin:$PATH
damit wird der neue pfad in die aktuelle shell expotiert
oder
. ˜/.profile
damit lädst du das enviroment neu in die aktuelle shell

gruss
hajo
 
Habe es hinbekommen.
Wenn mir jetzt noch jemand erklären könnte wie ich den Assistant oder den Designer von Trolltech QT geöffnet bekomme, wäre ich sehr dankbar

Danke
 
Hast du mal versucht, Qt über einen Paketmanager zu installieren wie Fink oder Darwin Ports?

So hab ich das jedenfalls immer gemacht.
 
ich vermute den qtdesigner kann man aus dem xterm oder mit open-x11 qtdesigner starten. pfad ist ja schon gesetzt.

gruss
hajo
 
yellow1 schrieb:
Habe es hinbekommen.
Wenn mir jetzt noch jemand erklären könnte wie ich den Assistant oder den Designer von Trolltech QT geöffnet bekomme, wäre ich sehr dankbar
Du gehst mit dem Finder in das Verzeichnis wohin du es installiert hast(notfalls mit Shift+Apfel+G /usr/local/Trolltech/Qt-4.2.1/bin) und klickst doppelt auf die Anwendung.


@com_hajo: qt4 braucht kein x11
@Incoming1983: gute Idee, aber sowohl DarwinPorts als auch Fink bieten nur Qt3
 
Zuletzt bearbeitet:
Vielen Dank an alle.
Komme jetzt mit allem klar.

yellow1
 
Zurück
Oben Unten