Giter VIP home page Giter VIP logo

easycanvas's Issues

希望支持linux

15:32:41: 为项目EasyCanvas执行步骤 ...
15:32:41: 配置没有改变, 跳过 qmake 步骤。
15:32:41: 正在启动 "/usr/bin/make" -j16

cd CustomWidgets/ && ( test -e Makefile || /opt/Qt5.14.2/5.14.2/gcc_64/bin/qmake -o Makefile /home/hokori/Documents/QtProj/EasyCanvas/CustomWidgets/CustomWidgets.pro -spec linux-g++ CONFIG+=debug CONFIG+=qml_debug ) && /usr/bin/make -f Makefile 
make[1]: Entering directory '/home/hokori/Documents/QtProj/EasyCanvas/build/build-EasyCanvas-Qt_5_14_2_gcc_64-Debug/CustomWidgets'
g++ -c -pipe -g -std=gnu++11 -Wall -Wextra -D_REENTRANT -fPIC -DCUSTOMWIDGETS_LIBRARY -DQT_DEPRECATED_WARNINGS -DQT_QML_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I../../../CustomWidgets -I. -I/opt/Qt5.14.2/5.14.2/gcc_64/include -I/opt/Qt5.14.2/5.14.2/gcc_64/include/QtWidgets -I/opt/Qt5.14.2/5.14.2/gcc_64/include/QtGui -I/opt/Qt5.14.2/5.14.2/gcc_64/include/QtCore -I../../../CustomWidgets/temp -isystem /usr/include/libdrm -I/opt/Qt5.14.2/5.14.2/gcc_64/mkspecs/linux-g++ -o ../../../CustomWidgets/temp/CustomDialog.o ../../../CustomWidgets/UICustomWidgtes/CustomDialog.cpp
../../../CustomWidgets/UICustomWidgtes/CustomDialog.cpp:9:10: fatal error: windowsx.h: No such file or directory
 #include <windowsx.h>
          ^~~~~~~~~~~~
compilation terminated.
Makefile:1594: recipe for target '../../../CustomWidgets/temp/CustomDialog.o' failed
make[1]: Leaving directory '/home/hokori/Documents/QtProj/EasyCanvas/build/build-EasyCanvas-Qt_5_14_2_gcc_64-Debug/CustomWidgets'
Makefile:54: recipe for target 'sub-CustomWidgets-make_first-ordered' failed
make[1]: *** [../../../CustomWidgets/temp/CustomDialog.o] Error 1
make: *** [sub-CustomWidgets-make_first-ordered] Error 2
15:32:41: 进程"/usr/bin/make"退出,退出代码 2 。
Error while building/deploying project EasyCanvas (kit: Qt 5.14.2 (gcc_64))
When executing step "Make"
15:32:41: Elapsed time: 00:00.

pythonQT-Qt5-python38的库不能定位程序输入点

环境
系统:win10 企业版,LTSC 1809
编译器:msvc2017_64
Qt版本:5.14.2

问题:编译都通过了,并生成了exe,但是调试运行找不到程序输入点在PythonQt_QtAll-Qt5-Python38,setItemData这个函数定位不了。
然后使用编译好的exe,拷贝到打包好的目录,可以直接运行。

什么原因,是字符编码的问题吗?
所做的更改:所有的pro被我加上了 utf-8 识别,否则会编译失败。

建议:希望作者加个自己的环境介绍,以及推荐的环境。虽不可能多种环境测试,但是做一个环境介绍及推荐环境,可以让别人快速编译使用到源码。

m_pCurrentOper 内存泄漏问题解决

EasyCanvasCore/UICanvas/UICanvasView.cpp b/EasyCanvasCore/UICanvas/UICanvasView.h 中 m_pCurrentOper 指针存在内存泄漏

建议如下修改:

diff --git a/EasyCanvasCore/UICanvas/UICanvasView.cpp b/EasyCanvasCore/UICanvas/UICanvasView.cpp
index b936367..9ff3fc6 100644
--- a/EasyCanvasCore/UICanvas/UICanvasView.cpp
+++ b/EasyCanvasCore/UICanvas/UICanvasView.cpp
@@ -87,7 +87,8 @@ void UICanvasView::setSelectedRect(const QRect& rect)
 
 void UICanvasView::setCurrentOperator(UICanvasOperBase* canvasOper)
 {
-    m_pCurrentOper = canvasOper;
+    m_pCurrentOper.reset();
+    m_pCurrentOper = std::make_shared<UICanvasOperBase>(canvasOper);
 }
 
 void UICanvasView::mousePressEvent(QMouseEvent* event)
diff --git a/EasyCanvasCore/UICanvas/UICanvasView.h b/EasyCanvasCore/UICanvas/UICanvasView.h
index da69da5..bd575cb 100644
--- a/EasyCanvasCore/UICanvas/UICanvasView.h
+++ b/EasyCanvasCore/UICanvas/UICanvasView.h
@@ -4,6 +4,7 @@
 #include <QGraphicsView>
 #include <QGraphicsScene>
 #include "easycanvascore_global.h"
+#include <memory>
 
 class UICanvasOperBase;
 class UICanvasPathItem;
@@ -82,7 +83,7 @@ private:
     UICanvasScene* m_pScene = nullptr;
 
     UICanvasPathItem* m_pathItem = nullptr;
-    UICanvasOperBase* m_pCurrentOper = nullptr;
+    std::shared_ptr<UICanvasOperBase> m_pCurrentOper(nullptr);
 
     // 选中矩形相关
     bool m_isSelectedRectVisible = false;

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.