Skip to content

Commit e39be13

Browse files
committed
Add MSVC 2017, Qt 5.8, and Qt 5.9 support
1 parent b534dad commit e39be13

File tree

3 files changed

+25
-5
lines changed

3 files changed

+25
-5
lines changed

CMakeLists.txt

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# If you are not a CMake expert, you should better use the provided qmake profiles.
66
#-----------------------------------------------------------------------------
77

8-
cmake_minimum_required(VERSION 2.8)
8+
cmake_minimum_required(VERSION 3.0)
99

1010
#-----------------------------------------------------------------------------
1111
project(PythonQt)
@@ -150,6 +150,8 @@ if(PythonQt_QT_VERSION VERSION_GREATER "4")
150150
list(APPEND QT_LIBRARIES ${Qt5${qtlib}_LIBRARIES})
151151
endforeach()
152152

153+
include_directories(${Qt5Core_PRIVATE_INCLUDE_DIRS})
154+
153155
set(QT_VERSION_MAJOR ${Qt5Core_VERSION_MAJOR})
154156
set(QT_VERSION_MINOR ${Qt5Core_VERSION_MINOR})
155157

@@ -234,6 +236,8 @@ set(sources
234236
src/PythonQtStdDecorators.cpp
235237
src/PythonQtStdIn.cpp
236238
src/PythonQtStdOut.cpp
239+
src/PythonQtProperty.cpp
240+
src/PythonQtSlotDecorator.cpp
237241
src/gui/PythonQtScriptingConsole.cpp
238242

239243
generated_cpp${generated_cpp_suffix}/PythonQt_QtBindings.cpp
@@ -272,6 +276,8 @@ set(headers
272276
src/PythonQtUtils.h
273277
src/PythonQtVariants.h
274278
src/PythonQtPythonInclude.h
279+
src/PythonQtProperty.h
280+
src/PythonQtSlotDecorator.cpp
275281
generated_cpp${generated_cpp_suffix}/PythonQt_QtBindings.h
276282
)
277283

@@ -342,6 +348,10 @@ set_target_properties(PythonQt PROPERTIES
342348
INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/lib"
343349
)
344350

351+
target_compile_options(PythonQt PRIVATE
352+
$<$<AND:$<CXX_COMPILER_ID:MSVC>,$<VERSION_GREATER:$<CXX_COMPILER_VERSION>,19.0>>:/bigobj>
353+
)
354+
345355
target_link_libraries(PythonQt
346356
${PYTHON_LIBRARY}
347357
${QT_LIBRARIES}

README.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@ official repository.
1717
Prerequisites
1818
-------------
1919

20-
* CMake 2.8.x
20+
* CMake 3.x
2121
* Qt 4.6.2 or above
2222

2323
Build instructions
2424
------------------
2525

26-
By default, the `patched-5` version will be checked out.
26+
By default, the `patched-7` version will be checked out.
2727

2828
```
2929
git clone git://github.com/commontk/PythonQt.git
@@ -43,7 +43,13 @@ Additional configure options are:
4343
Available branches
4444
------------------
4545

46-
This repository contains 8 branches:
46+
This repository contains 9 branches:
47+
48+
### patched-9
49+
* Based on patched-8
50+
* List of features:
51+
* Add MSVC 2017 support
52+
* Add Qt 5.8 and Qt 5.9 support
4753

4854
### patched-8
4955
* Based on [r455](http://sourceforge.net/p/pythonqt/code/455/) with:

generated_cpp_54/com_trolltech_qt_core_builtin/com_trolltech_qt_core_builtin0.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1264,7 +1264,11 @@ enum WindowModality{
12641264
enum WindowState{
12651265
WindowNoState = Qt::WindowNoState, WindowMinimized = Qt::WindowMinimized, WindowMaximized = Qt::WindowMaximized, WindowFullScreen = Qt::WindowFullScreen, WindowActive = Qt::WindowActive};
12661266
enum WindowType{
1267-
Widget = Qt::Widget, Window = Qt::Window, Dialog = Qt::Dialog, Sheet = Qt::Sheet, Drawer = Qt::Drawer, Popup = Qt::Popup, Tool = Qt::Tool, ToolTip = Qt::ToolTip, SplashScreen = Qt::SplashScreen, Desktop = Qt::Desktop, SubWindow = Qt::SubWindow, ForeignWindow = Qt::ForeignWindow, CoverWindow = Qt::CoverWindow, WindowType_Mask = Qt::WindowType_Mask, MSWindowsFixedSizeDialogHint = Qt::MSWindowsFixedSizeDialogHint, MSWindowsOwnDC = Qt::MSWindowsOwnDC, BypassWindowManagerHint = Qt::BypassWindowManagerHint, X11BypassWindowManagerHint = Qt::X11BypassWindowManagerHint, FramelessWindowHint = Qt::FramelessWindowHint, WindowTitleHint = Qt::WindowTitleHint, WindowSystemMenuHint = Qt::WindowSystemMenuHint, WindowMinimizeButtonHint = Qt::WindowMinimizeButtonHint, WindowMaximizeButtonHint = Qt::WindowMaximizeButtonHint, WindowMinMaxButtonsHint = Qt::WindowMinMaxButtonsHint, WindowContextHelpButtonHint = Qt::WindowContextHelpButtonHint, WindowShadeButtonHint = Qt::WindowShadeButtonHint, WindowStaysOnTopHint = Qt::WindowStaysOnTopHint, WindowTransparentForInput = Qt::WindowTransparentForInput, WindowOverridesSystemGestures = Qt::WindowOverridesSystemGestures, WindowDoesNotAcceptFocus = Qt::WindowDoesNotAcceptFocus, CustomizeWindowHint = Qt::CustomizeWindowHint, WindowStaysOnBottomHint = Qt::WindowStaysOnBottomHint, WindowCloseButtonHint = Qt::WindowCloseButtonHint, MacWindowToolBarButtonHint = Qt::MacWindowToolBarButtonHint, BypassGraphicsProxyWidget = Qt::BypassGraphicsProxyWidget, WindowOkButtonHint = Qt::WindowOkButtonHint, WindowCancelButtonHint = Qt::WindowCancelButtonHint, NoDropShadowWindowHint = Qt::NoDropShadowWindowHint, WindowFullscreenButtonHint = Qt::WindowFullscreenButtonHint};
1267+
Widget = Qt::Widget, Window = Qt::Window, Dialog = Qt::Dialog, Sheet = Qt::Sheet, Drawer = Qt::Drawer, Popup = Qt::Popup, Tool = Qt::Tool, ToolTip = Qt::ToolTip, SplashScreen = Qt::SplashScreen, Desktop = Qt::Desktop, SubWindow = Qt::SubWindow, ForeignWindow = Qt::ForeignWindow, CoverWindow = Qt::CoverWindow, WindowType_Mask = Qt::WindowType_Mask, MSWindowsFixedSizeDialogHint = Qt::MSWindowsFixedSizeDialogHint, MSWindowsOwnDC = Qt::MSWindowsOwnDC, BypassWindowManagerHint = Qt::BypassWindowManagerHint, X11BypassWindowManagerHint = Qt::X11BypassWindowManagerHint, FramelessWindowHint = Qt::FramelessWindowHint, WindowTitleHint = Qt::WindowTitleHint, WindowSystemMenuHint = Qt::WindowSystemMenuHint, WindowMinimizeButtonHint = Qt::WindowMinimizeButtonHint, WindowMaximizeButtonHint = Qt::WindowMaximizeButtonHint, WindowMinMaxButtonsHint = Qt::WindowMinMaxButtonsHint, WindowContextHelpButtonHint = Qt::WindowContextHelpButtonHint, WindowShadeButtonHint = Qt::WindowShadeButtonHint, WindowStaysOnTopHint = Qt::WindowStaysOnTopHint, WindowTransparentForInput = Qt::WindowTransparentForInput, WindowOverridesSystemGestures = Qt::WindowOverridesSystemGestures, WindowDoesNotAcceptFocus = Qt::WindowDoesNotAcceptFocus, CustomizeWindowHint = Qt::CustomizeWindowHint, WindowStaysOnBottomHint = Qt::WindowStaysOnBottomHint, WindowCloseButtonHint = Qt::WindowCloseButtonHint, MacWindowToolBarButtonHint = Qt::MacWindowToolBarButtonHint, BypassGraphicsProxyWidget = Qt::BypassGraphicsProxyWidget, NoDropShadowWindowHint = Qt::NoDropShadowWindowHint, WindowFullscreenButtonHint = Qt::WindowFullscreenButtonHint
1268+
#if QT_VERSION < 0x50800
1269+
, WindowOkButtonHint = Qt::WindowOkButtonHint, WindowCancelButtonHint = Qt::WindowCancelButtonHint
1270+
#endif
1271+
};
12681272
Q_DECLARE_FLAGS(Alignment, AlignmentFlag)
12691273
Q_DECLARE_FLAGS(DockWidgetAreas, DockWidgetArea)
12701274
Q_DECLARE_FLAGS(DropActions, DropAction)

0 commit comments

Comments
 (0)