PDA

View Full Version : Probleme mit QT4



ensacom1
9th January 2007, 18:18
Hallo, ich bin absoluter Anfänger was Qt4 und C++ Programmierung angeht. Deshalb bin ich gerade dabei dieses Tutorial (http://www.mrunix.de/forums/showthread.php?t=31182)
durchzuarbeiten.

Bei Lektion7 komme ich nicht weiter.
Ich habe QT3 und 4 installiert und möchte die ui mit dem Qt4-Designer erstellen.

also ich gebe make lektion7 ein und erhalte folgende Fehlermeldung.

Zitat:


g++ -c -pipe -Wall -W -O2 -D_REENTRANT -DQT_NO_DEBUG -DQT_THREAD_SUPPORT -DQT_SHARED -DQT_TABLET_SUPPORT -I/usr/share/qt3/mkspecs/linux-g++ -I. -I/usr/include/qt3 -Iuics/ -I. -Imocs/ -o obj/lektion7.o lektion7.cpp
qttutwidget.h:10: error: expected class-name before ‘{’ token
qttutwidget.h:10: warning: ‘class QtTutWidget’ has virtual functions but non-virtual destructor
lektion7.cpp: In function ‘int main(int, char**)’:
lektion7.cpp:10: error: ‘class QtTutWidget’ has no member named ‘resize’
lektion7.cpp:12: error: no matching function for call to ‘QApplication::setMainWidget(QtTutWidget*)â €™
/usr/include/qt3/qapplication.h:122: note: candidates are: virtual void QApplication::setMainWidget(QWidget*)
lektion7.cpp:14: error: ‘class QtTutWidget’ has no member named ‘show’
make: *** [obj/lektion7.o] Fehler 1


Kann mir einer sagen woran das liegt?
Wie und wo kann ich angeben dass ich QT4 und nicht QT3 benutzen will?

Danke schonmal

Methedrine
9th January 2007, 19:11
Hi,

(I hope the mods excuse my german here)

bitte nicht auf deutsch posten hier, dies ist ein internationales Forum. Davon abgesehen scheinst du irgendwo einen Syntaxfehler gemacht zu haben. Bitte poste den Sourcecode damit wir dir bei deinem Problem besser helfen können.

Um Qt 4 zu nutzen musst du es installiert haben und die Pfadangaben anpassen.

(and now for the non-german audience)

Please use english as language in your postings, it's an international forum. Apart from that we cannot help you without you providing us the sourcecode which is causing the trouble.

To use Qt 4 you must have Qt4 installed and point to the Qt4 paths.

wysota
9th January 2007, 20:26
You're likely missing some include for your widget - the compiler doesn't know it inherits QWidget (or maybe it doesn't).