Skip to content

Commit

Permalink
fix qmake files
Browse files Browse the repository at this point in the history
  • Loading branch information
gammasoft71 committed May 10, 2020
1 parent 65b6a9b commit 995c629
Show file tree
Hide file tree
Showing 70 changed files with 124 additions and 70 deletions.
1 change: 0 additions & 1 deletion Qt.Core/HelloWorld/src/HelloWorld.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#include <QString>
#include <QTextStream>

int main() {
Expand Down
2 changes: 1 addition & 1 deletion Qt.Examples.pro
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
TEMPLATE = subdirs
SUBDIRS = \
Qt.Core \
Qt.Quick \
Qt.Tests \
Qt.Widgets \
#Qt.Quick \
3 changes: 2 additions & 1 deletion Qt.Widgets/Application/DarkMode/DarkMode.pro
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
CONFIG += c++17
QT = widgets
SOURCES = src/DarkMode.cpp src/DarkMode.h
SOURCES = src/DarkMode.cpp
HEADERS = src/DarkMode.h
19 changes: 3 additions & 16 deletions Qt.Widgets/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,8 @@ project(Qt.Widgets)
add_subdirectory(HelloWorld)
add_subdirectory(Application)
add_subdirectory(CommonControls)
add_subdirectory(Components)
add_subdirectory(Containers)
add_subdirectory(Dialogs)
add_subdirectory(MenusAndToolbars)
add_subdirectory(Others)

# Menus and Toolbars
add_subdirectory(MainMenu)
add_subdirectory(StatusBar)

# Components
add_subdirectory(Cursors)
add_subdirectory(Timer)

# Dialogs
add_subdirectory(ColorDialog)
add_subdirectory(FolderBrowserDialog)
add_subdirectory(FontDialog)
add_subdirectory(MessageBox)
add_subdirectory(OpenFileDialog)
add_subdirectory(SaveFileDialog)
3 changes: 2 additions & 1 deletion Qt.Widgets/CommonControls/CheckBox/CheckBox.pro
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
CONFIG += c++17
QT = widgets
SOURCES = src/CheckBox.cpp src/CheckBox.h
SOURCES = src/CheckBox.cpp
HEADERS = src/CheckBox.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
CONFIG += c++17
QT = widgets
SOURCES = src/CheckedListWidget.cpp src/CheckedListWidget.h
SOURCES = src/CheckedListWidget.cpp
HEADERS = src/CheckedListWidget.h
4 changes: 4 additions & 0 deletions Qt.Widgets/CommonControls/DoubleSpinBox/DoubleSpinBox.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
CONFIG += c++17
QT = widgets
SOURCES = src/DoubleSpinBox.cpp
HEADERS = src/DoubleSpinBox.h
3 changes: 0 additions & 3 deletions Qt.Widgets/CommonControls/DoubleSpinBox/SpinBox.pro

This file was deleted.

3 changes: 2 additions & 1 deletion Qt.Widgets/CommonControls/LCDNumber/LCDNumber.pro
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
CONFIG += c++17
QT = widgets
SOURCES = src/LCDNumber.cpp src/LCDNumber.h
SOURCES = src/LCDNumber.cpp
HEADERS = src/LCDNumber.h
3 changes: 2 additions & 1 deletion Qt.Widgets/CommonControls/Label/Label.pro
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
CONFIG += c++17
QT = widgets
SOURCES = src/Label.cpp src/Label.h
SOURCES = src/Label.cpp
HEADERS = src/Label.h
3 changes: 2 additions & 1 deletion Qt.Widgets/CommonControls/LineEdit/LineEdit.pro
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
CONFIG += c++17
QT = widgets
SOURCES = src/LineEdit.cpp src/LineEdit.h
SOURCES = src/LineEdit.cpp
HEADERS = src/LineEdit.h
3 changes: 2 additions & 1 deletion Qt.Widgets/CommonControls/PictureBox/PictureBox.pro
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
CONFIG += c++17
QT = widgets
RESOURCES = PictureBox.qrc
SOURCES = src/PictureBox.cpp src/PictureBox.h
SOURCES = src/PictureBox.cpp
HEADERS = src/PictureBox.h
3 changes: 2 additions & 1 deletion Qt.Widgets/CommonControls/PictureBox2/PictureBox2.pro
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
CONFIG += c++17
QT = widgets
RESOURCES = PictureBox2.qrc
SOURCES = src/PictureBox2.cpp src/PictureBox2.h
SOURCES = src/PictureBox2.cpp
HEADERS = src/PictureBox2.h
3 changes: 2 additions & 1 deletion Qt.Widgets/CommonControls/ProgressBar/ProgressBar.pro
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
CONFIG += c++17
QT = widgets
SOURCES = src/ProgressBar.cpp src/ProgressBar.h
SOURCES = src/ProgressBar.cpp
HEADERS = src/ProgressBar.h
3 changes: 2 additions & 1 deletion Qt.Widgets/CommonControls/PushButton/PushButton.pro
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
CONFIG += c++17
QT = widgets
SOURCES = src/PushButton.cpp src/PushButton.h
SOURCES = src/PushButton.cpp
HEADERS = src/PushButton.h
3 changes: 2 additions & 1 deletion Qt.Widgets/CommonControls/RadioButton/RadioButton.pro
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
CONFIG += c++17
QT = widgets
SOURCES = src/RadioButton.cpp src/RadioButton.h
SOURCES = src/RadioButton.cpp
HEADERS = src/RadioButton.h
3 changes: 2 additions & 1 deletion Qt.Widgets/CommonControls/Slider/Slider.pro
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
CONFIG += c++17
QT = widgets
SOURCES = src/Slider.cpp src/Slider.h
SOURCES = src/Slider.cpp
HEADERS = src/Slider.h
3 changes: 2 additions & 1 deletion Qt.Widgets/CommonControls/SpinBox/SpinBox.pro
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
CONFIG += c++17
QT = widgets
SOURCES = src/SpinBox.cpp src/SpinBox.h
SOURCES = src/SpinBox.cpp
HEADERS = src/SpinBox.h
3 changes: 2 additions & 1 deletion Qt.Widgets/CommonControls/SpinButton/SpinButton.pro
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
CONFIG += c++17
QT = widgets
SOURCES = src/SpinButton.cpp src/SpinButton.h
SOURCES = src/SpinButton.cpp
HEADERS = src/SpinButton.h
3 changes: 2 additions & 1 deletion Qt.Widgets/CommonControls/ToggleButton/ToggleButton.pro
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
CONFIG += c++17
QT = widgets
SOURCES = src/ToggleButton.cpp src/ToggleButton.h
SOURCES = src/ToggleButton.cpp
HEADERS = src/ToggleButton.h
3 changes: 2 additions & 1 deletion Qt.Widgets/CommonControls/Widget/Widget.pro
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
CONFIG += c++17
QT = widgets
SOURCES = src/Widget.cpp src/Widget.h
SOURCES = src/Widget.cpp
HEADERS = src/Widget.h
8 changes: 8 additions & 0 deletions Qt.Widgets/Components/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
cmake_minimum_required(VERSION 3.2)

# Solution
project(Components)

# Components
add_subdirectory(Cursors)
add_subdirectory(Timer)
4 changes: 4 additions & 0 deletions Qt.Widgets/Components/Components.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
TEMPLATE = subdirs
SUBDIRS = \
Cursors \
Timer \
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
3 changes: 2 additions & 1 deletion Qt.Widgets/Containers/Containers.pro
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
TEMPLATE = subdirs
SUBDIRS = \
Frame \
GroupBox
GroupBox \
TabWidget \
Window \

3 changes: 2 additions & 1 deletion Qt.Widgets/Containers/Frame/Frame.pro
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
CONFIG += c++17
QT = widgets
SOURCES = src/Frame.cpp src/Frame.h
SOURCES = src/Frame.cpp
HEADERS = src/Frame.h
3 changes: 2 additions & 1 deletion Qt.Widgets/Containers/GroupBox/GroupBox.pro
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
CONFIG += c++17
QT = widgets
SOURCES = src/GroupBox.cpp src/GroupBox.h
SOURCES = src/GroupBox.cpp
HEADERS = src/GroupBox.h
3 changes: 2 additions & 1 deletion Qt.Widgets/Containers/TabWidget/TabWidget.pro
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
CONFIG += c++17
QT = widgets
SOURCES = src/TabWidget.cpp src/TabWidget.h
SOURCES = src/TabWidget.cpp
HEADERS = src/TabWidget.h
3 changes: 2 additions & 1 deletion Qt.Widgets/Containers/Window/Window.pro
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
CONFIG += c++17
QT = widgets
SOURCES = src/Window.cpp src/Window.h
SOURCES = src/Window.cpp
HEADERS = src/Window.h
12 changes: 12 additions & 0 deletions Qt.Widgets/Dialogs/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
cmake_minimum_required(VERSION 3.2)

# Solution
project(Dialogs)

# Dialogs
add_subdirectory(ColorDialog)
add_subdirectory(FolderBrowserDialog)
add_subdirectory(FontDialog)
add_subdirectory(MessageBox)
add_subdirectory(OpenFileDialog)
add_subdirectory(SaveFileDialog)
File renamed without changes.
File renamed without changes.
File renamed without changes.
8 changes: 8 additions & 0 deletions Qt.Widgets/Dialogs/Dialogs.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
TEMPLATE = subdirs
SUBDIRS = \
ColorDialog \
FolderBrowserDialog \
FontDialog \
MessageBox \
OpenFileDialog \
SaveFileDialog \
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
3 changes: 0 additions & 3 deletions Qt.Widgets/HelloWorld/HelloWorldLabel/HelloWorld.pro

This file was deleted.

4 changes: 4 additions & 0 deletions Qt.Widgets/HelloWorld/HelloWorldLabel/HelloWorldLabel.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
CONFIG += c++17
QT = widgets
SOURCES = src/HelloWorldLabel.cpp
HEADERS = src/HelloWorldLabel.h
8 changes: 8 additions & 0 deletions Qt.Widgets/MenusAndToolbars/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
cmake_minimum_required(VERSION 3.2)

# Solution
project(MenusAndToolbars)

# MenusAndToolbars
add_subdirectory(MainMenu)
add_subdirectory(StatusBar)
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 4 additions & 0 deletions Qt.Widgets/MenusAndToolbars/MenusAndToolbars.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
TEMPLATE = subdirs
SUBDIRS = \
MainMenu \
StatusBar \
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion Qt.Widgets/Others/LCDNumber2/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

# Application
add_executable(LCDNumber2 WIN32 MACOSX_BUNDLE src/LCDNumber2.cpp src/LCDNumber.h)
add_executable(LCDNumber2 WIN32 MACOSX_BUNDLE src/LCDNumber2.cpp src/LCDNumber2.h)
target_link_libraries(LCDNumber2 Qt5::Widgets)
1 change: 1 addition & 0 deletions Qt.Widgets/Others/LCDNumber2/LCDNumber2.pro
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
CONFIG += c++17
QT = widgets
SOURCES = src/LCDNumber2.cpp
HEADERS = src/LCDNumber2.h
2 changes: 1 addition & 1 deletion Qt.Widgets/Others/LCDNumber2/src/LCDNumber2.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include <QApplication>
#include "LCDNumber.h"
#include "LCDNumber2.h"

int main(int argc, char *argv[]) {
QApplication application(argc, argv);
Expand Down
14 changes: 3 additions & 11 deletions Qt.Widgets/Qt.Widgets.pro
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,8 @@ SUBDIRS = \
HelloWorld \
Application \
CommonControls \
Components \
Containers \
Dialogs \
MenusAndToolbars \
Others\
\
ColorDialog \
Cursors \
FolderBrowserDialog \
FontDialog \
MainMenu \
MessageBox \
OpenFileDialog \
SaveFileDialog \
StatusBar \
Timer \
32 changes: 20 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,29 +61,29 @@ Shows how to use Qt widgets only by programming code (c++17).

## Menus and toolbars

[MainMenu](Qt.Widgets/MainMenu) Shows how to create a main menu with QMenu and QAction.
[MainMenu](Qt.Widgets/MenusAndToolbarsinMenu) Shows how to create a main menu with QMenu and QAction.

[StatusBar](Qt.Widgets/StatusBar) Shows how to create a status bar with QStatusBar.
[StatusBar](Qt.Widgets/MenusAndToolbars/StatusBar) Shows how to create a status bar with QStatusBar.

## Components

[Cursors](Qt.Widgets/Cursors) Shows how to associate cursor to widget with QCursor.
[Cursors](Qt.Widgets/Components/Cursors) Shows how to associate cursor to widget with QCursor.

[Timer](Qt.Widgets/Timer) Shows how to create a Timer with QTimer.
[Timer](Qt.Widgets/Components/Timer) Shows how to create a Timer with QTimer.

## Dialogs

[ColorDialog](Qt.Widgets/ColorDialog) Shows how to create a ColorDialog with QColorDalog.
[ColorDialog](Qt.Widgets/Dialogs/ColorDialog) Shows how to create a ColorDialog with QColorDalog.

[FolderBrowserDialog](Qt.Widgets/FolderBrowserDialog) Shows how to create a FolderBrowserDialog with QFileDialog.
[FolderBrowserDialog](Qt.Widgets/Dialogs/FolderBrowserDialog) Shows how to create a FolderBrowserDialog with QFileDialog.

[FontDialog](Qt.Widgets/FontDialog) Shows how to create a FontDialog with Qfontdialog.
[FontDialog](Qt.Widgets/Dialogs/FontDialog) Shows how to create a FontDialog with Qfontdialog.

[OpenFileDialog](Qt.Widgets/OpenFileDialog) Shows how to create an OpenFileDialog with QFileDialog.
[OpenFileDialog](Qt.Widgets/Dialogs/OpenFileDialog) Shows how to create an OpenFileDialog with QFileDialog.

[MessageBox](Qt.Widgets/MessageBox) Shows how to create a MessageBox with QMessageBox.
[MessageBox](Qt.Widgets/Dialogs/MessageBox) Shows how to create a MessageBox with QMessageBox.

[SaveFileDialog](Qt.Widgets/SaveFileDialog) Shows how to create an SaveFileDialog with QFileDialog.
[SaveFileDialog](Qt.Widgets/Dialogs/SaveFileDialog) Shows how to create an SaveFileDialog with QFileDialog.

## Others

Expand All @@ -92,7 +92,7 @@ Shows how to use Qt widgets only by programming code (c++17).
## Download

``` shell
git clone https://github.com/gammasoft71/QtExamples QtExamples
git clone https://github.com/gammasoft71/Examples_Qt.git

```

Expand All @@ -108,6 +108,15 @@ To build this project, open "Terminal" and type following lines:

Set "CMAKE_PREFIX_PATH" with Qt5 install path.

#### Windows :

``` cmake
mkdir build
cd build
cmake ..
start ./Qt.Examples.sln
```

#### macOS :

``` cmake
Expand All @@ -117,7 +126,6 @@ cmake .. -G "Xcode"
open ./Qt.Examples.xcodeproj
```


#### Linux :

``` cmake
Expand Down

0 comments on commit 995c629

Please sign in to comment.