wxwidgets

zqt_helper 轻松开发Qt5 Widgets应用

不羁的心 提交于 2020-08-11 08:53:31
目标: 1. 代码更加紧凑,所写即所到。 2. 代码层次更直观,直接反映界面窗口层次关系。 3. 不继承类,不重写虚函数,slot接收QEvent。 4. 简单写布局,忘掉api函数。 5. 免去一大堆临时变量的变量名。 思路: operator () (QLayout*) 开始一个布局 operator () (QWidget*) 开始一个窗口元素,并将元素加入到布局 operator [] <T> (const T&) 设置布局或窗口元素的属性 operator [] (lambda) 设置一个元素的事件回调 zqt_helper项目地址 https://github.com/bbqz007/zhelper-qt5Widgets , 适用于Qt5 Widgets。 zwx_helper 项目地址 https://github.com/bbqz007/zhelper-wxWidgets , 适用于 wxWidgets。 使用zqt_helper如何写Qt Widgets 布局: layout::begin // 最外层垂直布局 ( new QVBoxLayout) [ QMargins() ] (layout::begin // 第一个水平布局 ( new QHBoxLayout) ( new QLineEdit) [ " input txt 1 " ] // id [

Cmake Could not find wxWigets

ぐ巨炮叔叔 提交于 2020-07-09 16:51:35
问题 I want to compile a source code on windows using CMake, it uses wxWigets library. I downloaded the wxWigets from the page: https://www.wxwidgets.org/ After building by Visual Studio, I got the library /lib file. I have already set PATH for wxWidgets_LIBRARIES and wxWidgets_INCLUDE_DIRS. But the following errors cannot be resolved. CMake Error at C:/Program Files/CMake/share/cmake-3.11/Modules/FindPackageHandleStandardArgs.cmake:137 (message): Could NOT find wxWidgets (missing: wxWidgets

Cmake Could not find wxWigets

…衆ロ難τιáo~ 提交于 2020-07-09 16:50:25
问题 I want to compile a source code on windows using CMake, it uses wxWigets library. I downloaded the wxWigets from the page: https://www.wxwidgets.org/ After building by Visual Studio, I got the library /lib file. I have already set PATH for wxWidgets_LIBRARIES and wxWidgets_INCLUDE_DIRS. But the following errors cannot be resolved. CMake Error at C:/Program Files/CMake/share/cmake-3.11/Modules/FindPackageHandleStandardArgs.cmake:137 (message): Could NOT find wxWidgets (missing: wxWidgets

How can I execute the function when button in wxYES_NO is pressed?

帅比萌擦擦* 提交于 2020-07-08 00:31:10
问题 Maybe my title is unclear, so I will tell here a more precise explanation: I am just learning WxWidgets, and I am now trying to make two files: main.cpp and Quit.h. Main.cpp will have the core of the application, and Quit.h will have the class for the quit dialog: Do you really want to quit this application (Yes / No). Now this is my Quit.h file (without include part): class Quit : public wxFrame { public: Quit(const wxString& tekst); }; Quit::Quit(const wxString& tekst) { wxMessageDialog*

I am getting wrong values when calling glReadPixels

断了今生、忘了曾经 提交于 2020-06-29 04:45:34
问题 In my program I am trying to select an object on right mouse click event using glReadPixels method. Window for rendering is created using wxWidgets (by extending wxFrame and wxGLCanvas). However, I am getting wrong values. He is tutorial that I used I was suggested to use this approach as it seems faster and easier than ray casting. My code: #include "MyGLCanvas.h" #include <glm/glm.hpp> #include <glm/gtc/matrix_transform.hpp> #include <glm/gtc/type_ptr.hpp> BEGIN_EVENT_TABLE(MyGLCanvas,

Trying to create a dialog in another thread wxpython

拟墨画扇 提交于 2020-06-27 08:49:31
问题 I'm running a function in another thread that is supposed to fill out a dialog and then show it but it just seg faults as soon as I tried to alter the dialog in any way. I've read that this is a common issue with WxPython and that devs are not intended to directly alter dialogs in another thread. How do I get around this? I can just call the function in my main thread but that will block my GUI and it is a lengthy operation to initialize the dialog - I would like to avoid this. My code is

wxWidgets setup in Microsoft Visual Studio 2017

家住魔仙堡 提交于 2020-05-25 07:38:37
问题 I've been trying to figure out for about 20 hours how to setup wxWidgets in Microsoft visual studio 2017. I've followed: https://wiki.wxwidgets.org/Microsoft_Visual_C%2B%2B_Guide https://raw.githubusercontent.com/wxWidgets/wxWidgets/WX_3_0_BRANCH/docs/msw/install.txt and other numerous websites on how to set it up. I've even followed some of the posts in this website like and youtube: How to set up wxWidgets 3.1.0 with Visual Studio 2015 I am literally stuck: I compiled it from source. And I

Visual Studio 2015编译wxWidgets

旧时模样 提交于 2020-05-05 17:24:19
宫指导说,换帅如换刀 程序员的编译器一换,基本套路必须都重练几次 使用wxWidgets并不难,但不能使用现有的库和工程配置文件,细节就必须理清楚 获取wxWidgets 官方的 下载 页面,下7z或zip文件均可 文件“wxWidgets根目录/docs/msw/install.txt”是编译说明文档,可以作为参考 添加环境变量WXWIN,值是wxWidgets根目录的路径。虽然不添加变量也可以编译,但很多wxWidgets插件的编译都依赖这个环境变量,因此最好加上。 wxWidgets根目录的路径不要含有空格 增加vs2015支持 vs2015影响编译的改动,主要是定义了snprintf,以及编译器版本升级到14。 需要对wxWidgets作如下修改,才能使用vs2015进行编译。 %WXWIN%\include\msvc\wx\setup.h,66行,增加版本支持 #elif _MSC_VER == 1900 #define wxCOMPILER_PREFIX vc140 %WXWIN%\include\wx\compiler.h,56行,增加版本支持 #elif __VISUALC__ < 2000 #define __VISUALC14__ 在下面三个文件中,找到snprintf的宏定义,注释掉   %WXWIN%\src\tiff\libtiff\tif_config

Python GUI开发环境的搭建(wxPython)

别等时光非礼了梦想. 提交于 2020-04-28 02:58:00
最近对Python的开发又来了兴趣,对于Python的开发一直停留在一个表面层的认识。 Python的入手简单,语法让人爱不释手,在网络通信方面自带有成熟的类库,还有第三方开发的开源包。 在GUI的开发上,Python自身带有TKinter库,还有第三方的库 (比如wxPython, Qt)等等, 今天就来简单介绍下wxPython开发的环境搭建。 wxPython是一个Python包装wxWidgets(这是用 C++ 编写),一个流行的跨平台GUI工具包。由Robin Dunn以及Harri Pasanen开发,wxPython是作为一个Python扩展模块。就像wxWidgets,wxPython也是一个免费的软件。可以从官方网站下载它。 在wxPython API主要模块包括一个核心模块。它由 wxObject 类,这是基础 API 的所有类。控制模块包含了所有 GUI 应用程序开发中使用的部件,例如,wx.Button,wx.StaticText(类似于一个标签),wx.TextCtrl(可编辑的文本控制)等。 wxPython 的API有GDI(图形设备接口)模块。这是一组用于在部件中的绘图类。 如字体,颜色,画笔等类就是其中的一部分。所有的容器窗口类是由 Windows 模块定义。 wxPython 官方网站也主持 Phoenix 工程计划 – 为Python3.*

安装wxPHP后,apache无法启动

风格不统一 提交于 2020-03-23 16:34:48
3 月,跳不动了?>>> apache无法启动,现象: 浏览器打开localhost,一直在等待中。 查看apache2的error日志,看到: tail -100 /var/log/apache2/error.log ... [Mon Feb 15 11:25:32 2016] [error] [client 10.0.0.163] Negotiation: discovered file(s) matching request: /var/www/index.html (None could be negotiated). 11:25:32: Error: Unable to initialize GTK+, is DISPLAY set properly? (apache2:6670): GLib-GObject-WARNING **: invalid (NULL) pointer instance (apache2:6670): GLib-GObject-CRITICAL **: g_signal_connect_data: assertion `G_TYPE_CHECK_INSTANCE (instance)' failed (apache2:6670): GLib-GObject-WARNING **: invalid (NULL) pointer instance