qt 6.5.1 original

This commit is contained in:
kleuter
2023-10-29 23:33:08 +01:00
parent 71d22ab6b0
commit 85d238dfda
21202 changed files with 5499099 additions and 0 deletions

View File

@ -0,0 +1,23 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
//! [0]
#include <QApplication>
#include <QPushButton>
#include <QLabel>
#include "myobject.h"
#include "mydialog.h"
int main(int argc, char **argv)
{
QApplication app(argc, argv);
MyObject obj;
MyDialog dialog;
dialog.connect(dialog.aButton, SIGNAL(clicked()), SLOT(close()));
dialog.show();
return app.exec();
}
//! [0]

View File

@ -0,0 +1,10 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
#include "mydialog.h"
MyDialog::MyDialog(QWidget *parent)
: QDialog(parent)
{
setupUi(this);
}

View File

@ -0,0 +1,17 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
#ifndef MYDIALOG_H
#define MYDIALOG_H
#include "ui_mydialog.h"
class MyDialog : public QDialog, public Ui::MyDialog
{
Q_OBJECT
public:
MyDialog(QWidget *parent = nullptr);
};
#endif

View File

@ -0,0 +1,47 @@
<ui version="4.0" >
<author></author>
<comment></comment>
<exportmacro></exportmacro>
<class>MyDialog</class>
<widget class="QDialog" name="MyDialog" >
<property name="geometry" >
<rect>
<x>0</x>
<y>0</y>
<width>401</width>
<height>70</height>
</rect>
</property>
<property name="windowTitle" >
<string>Mach 2!</string>
</property>
<layout class="QVBoxLayout" >
<property name="margin" >
<number>9</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
<item>
<widget class="QLabel" name="aLabel" >
<property name="text" >
<string>Join the life in the fastlane; - PCH enable your project today! -</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="aButton" >
<property name="text" >
<string>&amp;Quit</string>
</property>
<property name="shortcut" >
<string>Alt+Q</string>
</property>
</widget>
</item>
</layout>
</widget>
<pixmapfunction>qPixmapFromMimeSource</pixmapfunction>
<resources/>
<connections/>
</ui>

View File

@ -0,0 +1,20 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
//! [0]
#include <iostream>
#include <QDebug>
#include <QObject>
#include "myobject.h"
MyObject::MyObject()
: QObject()
{
std::cout << "MyObject::MyObject()\n";
}
//! [0]
MyObject::~MyObject()
{
qDebug() << "MyObject::~MyObject()";
}

View File

@ -0,0 +1,18 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
#ifndef MYOBJECT_H
#define MYOBJECT_H
//! [0]
#include <QObject>
class MyObject : public QObject
{
public:
MyObject();
~MyObject();
};
//! [0]
#endif

View File

@ -0,0 +1,23 @@
#############################################
#
# Example for using Precompiled Headers
#
#############################################
#! [0]
TEMPLATE = app
LANGUAGE = C++
CONFIG += cmdline precompile_header
QT += widgets
# Use Precompiled headers (PCH)
PRECOMPILED_HEADER = stable.h
HEADERS = stable.h \
mydialog.h \
myobject.h
SOURCES = main.cpp \
mydialog.cpp \
myobject.cpp \
util.cpp
FORMS = mydialog.ui
#! [0]

View File

@ -0,0 +1,15 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
//! [0]
/* Add C includes here */
#if defined __cplusplus
/* Add C++ includes here */
# include <iostream>
# include <QApplication>
# include <QPushButton>
# include <QLabel>
#endif
//! [0]

View File

@ -0,0 +1,12 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
//! [0]
void util_function_does_nothing()
{
// Nothing here...
int x = 0;
++x;
}
//! [0]

View File

@ -0,0 +1,12 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
#include <QDebug>
#include "hello.h"
MyPushButton::MyPushButton(const QString &text)
: QPushButton(text)
{
setObjectName("mypushbutton");
qDebug() << "My PushButton has been constructed";
}

View File

@ -0,0 +1,10 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
#include <QPushButton>
class MyPushButton : public QPushButton
{
public:
MyPushButton(const QString &text);
};

View File

@ -0,0 +1,5 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
// This file does nothing, but check your Makefile to see if there is a
// reference to hello_win.cpp - there shouldn't be if qmake is used on X11.

View File

@ -0,0 +1,5 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
// This file does nothing, but check your Makefile to see if there is a
// reference to hello_x11.cpp - there shouldn't be if qmake is used on Windows.

View File

@ -0,0 +1,16 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
#include <QApplication>
#include "hello.h"
int main(int argc, char **argv)
{
QApplication app(argc, argv);
MyPushButton helloButton("Hello world!");
helloButton.resize(100, 30);
helloButton.show();
return app.exec();
}