Skip to content

Commit 8b81a7c

Browse files
authored
feat: update Qt requirement to 6.8 LTS (#5)
- Update CI builds to Qt 6.8.3 LTS - Add Apple Silicon (ARM) macOS build target - Fix Windows build to use MSVC 2022 - Remove specific Qt version numbers from documentation - Update project description to emphasize secure offline operation - Add plugin sandboxing info to README refactor(ui): migrate dialogs and settings tabs to Qt Designer UI files - Convert settings tabs to use .ui files for cleaner separation - Add model download manager and registration dialog - Add plugin wizard with wizard pages - Add Python environment manager - Simplify code by moving UI creation to Qt Designer
1 parent 62d4341 commit 8b81a7c

File tree

85 files changed

+10401
-1133
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

85 files changed

+10401
-1133
lines changed

.claude/CLAUDE.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# GitHub Copilot Instructions for PolySeg
22

33
## Project Overview
4-
PolySeg is a Qt6-based polygon annotation tool for creating instance segmentation datasets. The application enables interactive drawing, editing, and management of polygon annotations on images, exporting to normalized coordinate format compatible with various deep learning frameworks through plugin architecture.
4+
PolySeg is a secure offline polygon annotation tool for creating instance segmentation datasets. The application enables interactive drawing, editing, and management of polygon annotations on images, exporting to normalized coordinate format compatible with various deep learning frameworks through plugin architecture.
55

66
## Code Standards and Language Requirements
77

@@ -54,7 +54,7 @@ feat(canvas): add multi-polygon selection support
5454
5555
fix(plugins): resolve memory leak in AI model loading
5656
57-
docs: update build instructions for Qt 6.4
57+
docs: update build instructions
5858
5959
refactor(mainwindow): extract file dialog logic to separate method
6060
```
@@ -192,8 +192,8 @@ painter.drawLine(p1, p2);
192192
- Verify annotation format: Check .txt file has multiple lines
193193
194194
## Dependencies
195-
- Qt 6.5.3 (Core, Widgets, GUI)
196195
- C++17 compiler
196+
- qmake build system
197197
- Future: OpenCV (for AI features in Phase 7)
198198
199199
## Notes for AI Assistance
@@ -279,14 +279,12 @@ Example:
279279
280280
## Technologies:
281281
282-
- Qt 6.5.3
283-
- C++
282+
- C++17
284283
- QPainter for 2D graphics
285-
- Qt Designer for UI
286284
287285
## Build:
288286
289-
Project uses Qt Creator and qmake. Build from the `build` directory:
287+
Build from the `build` directory:
290288
```bash
291289
cd build
292290
qmake ../PolySeg.pro

.github/workflows/build.yml

Lines changed: 35 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ jobs:
1313
- uses: actions/checkout@v4
1414

1515
- name: Install Qt
16-
uses: jurplel/install-qt-action@v4
16+
uses: jurplel/install-qt-action@v4.3.0
1717
with:
18-
version: '6.5.3'
18+
version: '6.8.3'
1919
host: 'linux'
2020
target: 'desktop'
21-
arch: 'gcc_64'
21+
arch: 'linux_gcc_64'
2222
cache: true
2323

2424
- name: Build
@@ -38,12 +38,12 @@ jobs:
3838
- uses: actions/checkout@v4
3939

4040
- name: Install Qt
41-
uses: jurplel/install-qt-action@v4
41+
uses: jurplel/install-qt-action@v4.3.0
4242
with:
43-
version: '6.5.3'
43+
version: '6.8.3'
4444
host: 'windows'
4545
target: 'desktop'
46-
arch: 'win64_msvc2019_64'
46+
arch: 'win64_msvc2022_64'
4747
cache: true
4848

4949
- name: Setup MSVC
@@ -60,15 +60,40 @@ jobs:
6060
name: PolySeg-windows
6161
path: release/PolySeg.exe
6262

63-
build-macos:
63+
build-macos-intel:
64+
runs-on: macos-15
65+
steps:
66+
- uses: actions/checkout@v4
67+
68+
- name: Install Qt
69+
uses: jurplel/install-qt-action@v4.3.0
70+
with:
71+
version: '6.8.3'
72+
host: 'mac'
73+
target: 'desktop'
74+
arch: 'clang_64'
75+
cache: true
76+
77+
- name: Build
78+
run: |
79+
qmake PolySeg.pro CONFIG+=release
80+
make -j$(sysctl -n hw.ncpu)
81+
82+
- name: Upload artifact
83+
uses: actions/upload-artifact@v4
84+
with:
85+
name: PolySeg-macos-intel
86+
path: PolySeg.app
87+
88+
build-macos-arm:
6489
runs-on: macos-latest
6590
steps:
6691
- uses: actions/checkout@v4
6792

6893
- name: Install Qt
69-
uses: jurplel/install-qt-action@v4
94+
uses: jurplel/install-qt-action@v4.3.0
7095
with:
71-
version: '6.5.3'
96+
version: '6.8.3'
7297
host: 'mac'
7398
target: 'desktop'
7499
arch: 'clang_64'
@@ -82,5 +107,5 @@ jobs:
82107
- name: Upload artifact
83108
uses: actions/upload-artifact@v4
84109
with:
85-
name: PolySeg-macos
110+
name: PolySeg-macos-arm
86111
path: PolySeg.app

NOTICE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ The original copyright notices and licenses are provided below.
1313

1414
================================================================================
1515

16-
Qt Framework (v6.5.3)
16+
Qt Framework
1717
Copyright (C) The Qt Company Ltd.
1818
Licensed under GNU Lesser General Public License v3 (LGPL v3)
1919

PolySeg.pro

Lines changed: 115 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,156 @@
1-
QT += core gui
1+
QT += core gui network
22

33
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
44

5-
CONFIG += c++17
5+
CONFIG += c++17 strict_c++
6+
7+
# Compiler warning flags (best practices)
8+
gcc|clang {
9+
QMAKE_CXXFLAGS += -Wall
10+
QMAKE_CXXFLAGS += -Wextra
11+
QMAKE_CXXFLAGS += -Wpedantic
12+
QMAKE_CXXFLAGS += -Wshadow
13+
QMAKE_CXXFLAGS += -Wnon-virtual-dtor
14+
QMAKE_CXXFLAGS += -Wold-style-cast
15+
QMAKE_CXXFLAGS += -Wcast-align
16+
QMAKE_CXXFLAGS += -Wunused
17+
QMAKE_CXXFLAGS += -Woverloaded-virtual
18+
# warnings in Qt headers that cannot be fixed in user code
19+
# QMAKE_CXXFLAGS += -Wconversion
20+
# QMAKE_CXXFLAGS += -Wsign-conversion
21+
QMAKE_CXXFLAGS += -Wnull-dereference
22+
QMAKE_CXXFLAGS += -Wdouble-promotion
23+
QMAKE_CXXFLAGS += -Wformat=2
24+
QMAKE_CXXFLAGS += -Wimplicit-fallthrough
25+
}
26+
27+
# MSVC warning flags
28+
msvc {
29+
QMAKE_CXXFLAGS += /W4
30+
QMAKE_CXXFLAGS += /permissive-
31+
}
32+
33+
# GCC-specific warnings
34+
gcc:!clang {
35+
QMAKE_CXXFLAGS += -Wduplicated-cond
36+
QMAKE_CXXFLAGS += -Wduplicated-branches
37+
QMAKE_CXXFLAGS += -Wlogical-op
38+
# warnings in Qt headers that cannot be fixed in user code
39+
# QMAKE_CXXFLAGS += -Wuseless-cast
40+
}
41+
42+
# Treat warnings as errors in release builds (optional, uncomment if desired)
43+
# CONFIG(release, debug|release): QMAKE_CXXFLAGS += -Werror
44+
45+
# Debug-specific flags
46+
CONFIG(debug, debug|release) {
47+
gcc|clang {
48+
QMAKE_CXXFLAGS += -g3
49+
QMAKE_CXXFLAGS += -fno-omit-frame-pointer
50+
# Enable sanitizers for debug builds (uncomment as needed)
51+
# QMAKE_CXXFLAGS += -fsanitize=address,undefined
52+
# QMAKE_LFLAGS += -fsanitize=address,undefined
53+
}
54+
msvc {
55+
QMAKE_CXXFLAGS += /Zi
56+
}
57+
}
58+
59+
# Release-specific flags
60+
CONFIG(release, debug|release) {
61+
gcc|clang {
62+
QMAKE_CXXFLAGS += -O2
63+
}
64+
msvc {
65+
QMAKE_CXXFLAGS += /O2
66+
}
67+
DEFINES += NDEBUG
68+
}
669

770
# Include paths
871
INCLUDEPATH += src
972

1073
# You can make your code fail to compile if it uses deprecated APIs.
1174
# In order to do so, uncomment the following line.
12-
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
75+
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060800 # disables all APIs deprecated before 6.8
1376

1477
SOURCES += \
1578
src/main.cpp \
1679
src/mainwindow.cpp \
1780
src/modelcomparisondialog.cpp \
81+
src/modeldownloadmanager.cpp \
82+
src/modelregistrationdialog.cpp \
1883
src/polygoncanvas.cpp \
1984
src/projectconfig.cpp \
85+
src/pythonenvironmentmanager.cpp \
2086
src/settingstabbase.cpp \
2187
src/projectsettingstab.cpp \
2288
src/aimodelsettingstab.cpp \
2389
src/importexportsettingstab.cpp \
2490
src/settingsdialog.cpp \
2591
src/shortcuteditdialog.cpp \
2692
src/shortcutssettingstab.cpp \
27-
src/aipluginmanager.cpp
93+
src/aipluginmanager.cpp \
94+
src/pluginwizard.cpp \
95+
src/wizardpages/welcomepage.cpp \
96+
src/wizardpages/pluginselectionpage.cpp \
97+
src/wizardpages/custompluginpage.cpp \
98+
src/wizardpages/modelselectionpage.cpp \
99+
src/wizardpages/pretrainedmodelpage.cpp \
100+
src/wizardpages/downloadpage.cpp \
101+
src/wizardpages/configurationpage.cpp \
102+
src/wizardpages/customconfigurationpage.cpp \
103+
src/wizardpages/summarypage.cpp
28104

29105
HEADERS += \
30106
src/mainwindow.h \
31107
src/modelcomparisondialog.h \
108+
src/modeldownloadmanager.h \
109+
src/modelregistrationdialog.h \
32110
src/polygoncanvas.h \
33111
src/projectconfig.h \
112+
src/pythonenvironmentmanager.h \
34113
src/settingstabbase.h \
35114
src/projectsettingstab.h \
36115
src/aimodelsettingstab.h \
37116
src/importexportsettingstab.h \
38117
src/settingsdialog.h \
39118
src/shortcuteditdialog.h \
40119
src/shortcutssettingstab.h \
41-
src/aipluginmanager.h
120+
src/aipluginmanager.h \
121+
src/pluginwizard.h \
122+
src/wizardpages/welcomepage.h \
123+
src/wizardpages/pluginselectionpage.h \
124+
src/wizardpages/custompluginpage.h \
125+
src/wizardpages/modelselectionpage.h \
126+
src/wizardpages/pretrainedmodelpage.h \
127+
src/wizardpages/downloadpage.h \
128+
src/wizardpages/configurationpage.h \
129+
src/wizardpages/customconfigurationpage.h \
130+
src/wizardpages/summarypage.h
42131

43132
FORMS += \
44-
src/mainwindow.ui
133+
src/mainwindow.ui \
134+
src/settingsdialog.ui \
135+
src/aimodelsettingstab.ui \
136+
src/projectsettingstab.ui \
137+
src/importexportsettingstab.ui \
138+
src/shortcutssettingstab.ui \
139+
src/shortcuteditdialog.ui \
140+
src/modelcomparisondialog.ui \
141+
src/modelregistrationdialog.ui \
142+
src/wizardpages/welcomepage.ui \
143+
src/wizardpages/pluginselectionpage.ui \
144+
src/wizardpages/custompluginpage.ui \
145+
src/wizardpages/modelselectionpage.ui \
146+
src/wizardpages/pretrainedmodelpage.ui \
147+
src/wizardpages/downloadpage.ui \
148+
src/wizardpages/configurationpage.ui \
149+
src/wizardpages/customconfigurationpage.ui \
150+
src/wizardpages/summarypage.ui
151+
152+
RESOURCES += \
153+
resources/resources.qrc
45154

46155
# Default rules for deployment.
47156
qnx: target.path = /tmp/$${TARGET}/bin

README.md

Lines changed: 4 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,8 @@
33
**Smart Polygon Annotation with Universal AI Plugin Support**
44

55
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
6-
[![Qt Version](https://img.shields.io/badge/Qt-6.5.3-green.svg)](https://www.qt.io/)
76

8-
A professional Qt6-based desktop application for creating polygon annotations for computer vision training datasets. Features a **universal AI plugin system** that integrates with any AI detection framework.
7+
A secure offline desktop application for creating polygon annotations for computer vision training datasets. Features a **universal AI plugin system** that integrates with any AI detection framework.
98

109
---
1110

@@ -81,39 +80,10 @@ PolySeg is designed for ML engineers, data scientists, and researchers who need
8180

8281
### Build Requirements
8382

84-
- **Qt Framework**: 6.5.3 or later
8583
- **Compiler**: C++17 compatible (GCC, Clang, MSVC)
86-
- **Build System**: qmake
84+
- **Build System**: qmake (requires Qt 6.8+)
8785
- **Optional**: clang-format and clang-tidy (for development)
8886

89-
### Installing Qt 6.4
90-
91-
**Linux (Ubuntu/Debian):**
92-
```bash
93-
sudo apt-get update
94-
sudo apt-get install -y qt6-base-dev qt6-tools-dev-tools
95-
```
96-
97-
**Linux (Fedora):**
98-
```bash
99-
sudo dnf install qt6-qtbase-devel qt6-qttools-devel
100-
```
101-
102-
**Linux (Arch):**
103-
```bash
104-
sudo pacman -S qt6-base qt6-tools
105-
```
106-
107-
**macOS (Homebrew):**
108-
```bash
109-
brew install qt@6
110-
```
111-
112-
**Windows:**
113-
- Download Qt installer from [qt.io/download](https://www.qt.io/download-open-source)
114-
- Run the installer and select Qt 6.5.3 with MSVC compiler
115-
- Add Qt bin directory to PATH (e.g., `C:\Qt\6.5.3\msvc2019_64\bin`)
116-
11787
### AI Plugin Requirements (Optional)
11888

11989
To use AI-assisted annotation, you need:
@@ -368,6 +338,7 @@ PolySeg (C++/Qt) ←→ subprocess ←→ Plugin (Python/other)
368338
- **Zero dependencies**: PolySeg does NOT link to AI libraries
369339
- **Simple protocol**: JSON-based stdin/stdout communication
370340
- **Flexible deployment**: Native Python, Docker, virtualenv, conda
341+
- **Sandboxed execution**: Run plugins in Docker containers for complete isolation
371342

372343
### Plugin Configuration Examples
373344

@@ -896,7 +867,7 @@ MIT and Apache 2.0 licensed plugins can be freely integrated.
896867

897868
This application is built with:
898869

899-
- **Qt Framework 6.5.3** - LGPL v3 License ([https://www.qt.io/](https://www.qt.io/))
870+
- **Qt Framework** - LGPL v3 License ([https://www.qt.io/](https://www.qt.io/))
900871
- Qt is dynamically linked, allowing users to replace libraries under LGPL v3 terms
901872

902873
---

THIRD-PARTY-LICENSES.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ PolySeg uses the following third-party software components:
44

55
## Qt Framework
66

7-
**Version:** 6.5.3
87
**License:** GNU Lesser General Public License v3 (LGPL v3)
98
**Copyright:** The Qt Company Ltd.
109
**Website:** https://www.qt.io/

0 commit comments

Comments
 (0)