Results 1 to 3 of 3

Thread: Probleme mit QT4

  1. #1
    Join Date
    Jan 2007
    Posts
    1
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Probleme mit QT4

    Hallo, ich bin absoluter Anfänger was Qt4 und C++ Programmierung angeht. Deshalb bin ich gerade dabei dieses Tutorial
    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

  2. #2
    Join Date
    May 2006
    Location
    Germany
    Posts
    108
    Thanks
    2
    Thanked 14 Times in 12 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Probleme mit QT4

    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.

  3. #3
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Probleme mit QT4

    You're likely missing some include for your widget - the compiler doesn't know it inherits QWidget (or maybe it doesn't).

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.