Hallo
anbei die mainwindow
Code: Alles auswählen
#pragma once
#include <QMainWindow>
#include <QLabel>
#include <QtGui>
#include <QTabWidget>
#include <QGLWidget>
class MainWindow : public QMainWindow
{
Q_OBJECT
private:
QLabel *label1;
QLabel *label2;
QTabWidget *widget;
QTabWidget *widget1;
void createDockWindows()
{
QDockWidget *dock = new QDockWidget(tr("Customers"), this);
dock->setAllowedAreas(Qt::LeftDockWidgetArea | Qt::BottomDockWidgetArea);
widget = new QTabWidget(dock);
QGLWidget *Test1 = new QGLWidget;
QWidget *Test2 = new QWidget;
dock->setWidget(widget);
addDockWidget(Qt::LeftDockWidgetArea, dock);
dock = new QDockWidget(tr("Docklinks"), this);
dock->setAllowedAreas(Qt::LeftDockWidgetArea | Qt::BottomDockWidgetArea);
widget1 = new QTabWidget(dock);
widget1->addTab(Test1,"label1");
widget1->addTab(Test2,"label2");
dock->setWidget(widget1);
addDockWidget(Qt::BottomDockWidgetArea, dock);
};
public:
MainWindow()
{
setWindowTitle(tr("Lego"));
resize(800,600);
QLabel *label = new QLabel("<center>Zentral</center>");
setCentralWidget(label);
label->setAlignment(Qt::AlignCenter);
createDockWindows();
}
};
in der steht unter Präprozessoranweisung
Befehlszeile
$(QTDIR)\bin\moc.exe “$(InputPath)” -o “$(InputDir)moc_$(InputName).cpp”
zus Abhängikeiten
$(InputDir)moc_$(InputName).cpp
in der Dos Zeile mit qmake bringt er folgendes
Code: Alles auswählen
C:\Dokumente und Einstellungen\Matze\Eigene Dateien\qtproject\qtproject>qmake -o
Makefile hellogl.pro
C:\Dokumente und Einstellungen\Matze\Eigene Dateien\qtproject\qtproject>make
c:\qt\4.4.3\bin\qmake.exe -win32 -o Makefile hellogl.pro
c:\qt\4.4.3\bin\qmake.exe -win32 -o Makefile hellogl.pro
make -f Makefile.Debug
make[1]: Entering directory `C:/Dokumente und Einstellungen/Matze/Eigene Dateien
/qtproject/qtproject'
Makefile.Debug:59: *** missing separator. Stop.
make[1]: Leaving directory `C:/Dokumente und Einstellungen/Matze/Eigene Dateien/
qtproject/qtproject'
make: *** [debug] Error 2
C:\Dokumente und Einstellungen\Matze\Eigene Dateien\qtproject\qtproject>
bei nmake gibt er folgendes aus
Code: Alles auswählen
C:\Dokumente und Einstellungen\Matze\Eigene Dateien\qtproject\qtproject>nmake ma
in.cpp
Microsoft (R) Program Maintenance Utility, Version 9.00.21022.08
Copyright (C) Microsoft Corporation. Alle Rechte vorbehalten.
main.cpp(4) : fatal error U1033: Syntaxfehler: "int" unerwartet
Stop.
C:\Dokumente und Einstellungen\Matze\Eigene Dateien\qtproject\qtproject>
in er hellogl.pro steht
Code: Alles auswählen
HEADERS = mainwindow.h
SOURCES = main.cpp
QT += opengl
# install
target.path = $$[QT_INSTALL_EXAMPLES]/opengl/hellogl
sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS hellogl.pro
sources.path = $$[QT_INSTALL_EXAMPLES]/opengl/hellogl
INSTALLS += target sources
an der Beispiel datei macht er ewig rum und schreibt immer wieder
das in die kosnole
Code: Alles auswählen
C:\QT\4.4.3\examples\opengl\hellogl>qmake -o Makefile hellogl.pro
C:\QT\4.4.3\examples\opengl\hellogl>make
c:\qt\4.4.3\bin\qmake.exe -win32 -o Makefile hellogl.pro
c:\qt\4.4.3\bin\qmake.exe -win32 -o Makefile hellogl.pro
c:\qt\4.4.3\bin\qmake.exe -win32 -o Makefile hellogl.pro
c:\qt\4.4.3\bin\qmake.exe -win32 -o Makefile hellogl.pro
c:\qt\4.4.3\bin\qmake.exe -win32 -o Makefile hellogl.pro
c:\qt\4.4.3\bin\qmake.exe -win32 -o Makefile hellogl.pro
c:\qt\4.4.3\bin\qmake.exe -win32 -o Makefile hellogl.pro
c:\qt\4.4.3\bin\qmake.exe -win32 -o Makefile hellogl.pro
c:\qt\4.4.3\bin\qmake.exe -win32 -o Makefile hellogl.pro
c:\qt\4.4.3\bin\qmake.exe -win32 -o Makefile hellogl.pro
c:\qt\4.4.3\bin\qmake.exe -win32 -o Makefile hellogl.pro
c:\qt\4.4.3\bin\qmake.exe -win32 -o Makefile hellogl.pro
c:\qt\4.4.3\bin\qmake.exe -win32 -o Makefile hellogl.pro
c:\qt\4.4.3\bin\qmake.exe -win32 -o Makefile hellogl.pro
c:\qt\4.4.3\bin\qmake.exe -win32 -o Makefile hellogl.pro
c:\qt\4.4.3\bin\qmake.exe -win32 -o Makefile hellogl.pro
c:\qt\4.4.3\bin\qmake.exe -win32 -o Makefile hellogl.pro
c:\qt\4.4.3\bin\qmake.exe -win32 -o Makefile hellogl.pro
c:\qt\4.4.3\bin\qmake.exe -win32 -o Makefile hellogl.pro
c:\qt\4.4.3\bin\qmake.exe -win32 -o Makefile hellogl.pro
c:\qt\4.4.3\bin\qmake.exe -win32 -o Makefile hellogl.pro
c:\qt\4.4.3\bin\qmake.exe -win32 -o Makefile hellogl.pro
c:\qt\4.4.3\bin\qmake.exe -win32 -o Makefile hellogl.pro
c:\qt\4.4.3\bin\qmake.exe -win32 -o Makefile hellogl.pro
c:\qt\4.4.3\bin\qmake.exe -win32 -o Makefile hellogl.pro
c:\qt\4.4.3\bin\qmake.exe -win32 -o Makefile hellogl.pro
c:\qt\4.4.3\bin\qmake.exe -win32 -o Makefile hellogl.pro
c:\qt\4.4.3\bin\qmake.exe -win32 -o Makefile hellogl.pro
c:\qt\4.4.3\bin\qmake.exe -win32 -o Makefile hellogl.pro
c:\qt\4.4.3\bin\qmake.exe -win32 -o Makefile hellogl.pro
c:\qt\4.4.3\bin\qmake.exe -win32 -o Makefile hellogl.pro
c:\qt\4.4.3\bin\qmake.exe -win32 -o Makefile hellogl.pro
c:\qt\4.4.3\bin\qmake.exe -win32 -o Makefile hellogl.pro
c:\qt\4.4.3\bin\qmake.exe -win32 -o Makefile hellogl.pro
.
.
.
.