pyside

Is there a way to overlay multiple items on a parent widget (PySide/Qt)

好久不见. 提交于 2020-05-15 04:05:07
问题 I have a main parent widget, and I want several layouts on top of the parent widget. Initializing a layout with a parent widget will place the layout on top of the parent widget. I like this and would like to do it multiple times (left, top, bottom, and right sides) for the same parent widget. I used a QGridLayout with different sub layouts, but this caused the layouts to resize and forced them to be small. Whatever Overlay is added last should be on top of the other items. Below is a very

pycharm使用debug模式,报错:pydev debugger: process 13108 is connecting

三世轮回 提交于 2020-05-03 23:54:22
debug代码报错: pydev debugger: process 13108 is connecting Process finished with exit code -1073741819 (0xC0000005) 原因很简单: 在setting 里面 debug 选项中的 ,pyqt compatable 选择了auto ,pyqt5不兼容,PyQt4 或 PySide 二者选其一即可 解决办法: 也可能是 pycharm 被禁止联网的原因,允许联网就可以了 正常 Debug 的结果图: 原文链接:https://blog.csdn.net/xrinosvip/article/details/82116801 来源: oschina 链接: https://my.oschina.net/u/4397001/blog/3421491

FreeCAD二次开发-PySide例子QtGui.QMessageBox弹出信息窗口

℡╲_俬逩灬. 提交于 2020-03-24 20:46:38
FreeCAD作为一款基于OpenCasCAD内核的开源CAD软件,可以在GitHub上下载源代码。阅读源代码,有助于我们学习CAD软件架构,了解底层几何算法。 由博主Caesar卢尚宇自学整理 (纯粹出于对三维CAD软件开发的热爱) 内容出自FreeCAD官方社区https://wiki.freecadweb.org/PySide_Beginner_Examples from PySide import QtGui, QtCore reply = QtGui.QMessageBox.information(None,"","Houston, we have a problem")Caesar卢尚宇2020年3月24日 来源: https://www.cnblogs.com/nxopen2018/p/12561393.html

FreeCAD二次开发-PySide例子QtGui.QMessageBox弹出Yes和No窗口

对着背影说爱祢 提交于 2020-03-24 20:10:06
FreeCAD作为一款基于OpenCasCAD内核的开源CAD软件,可以在GitHub上下载源代码。阅读源代码,有助于我们学习CAD软件架构,了解底层几何算法。 由博主Caesar卢尚宇自学整理 (纯粹出于对三维CAD软件开发的热爱) 内容出自FreeCAD官方社区https://wiki.freecadweb.org/PySide_Beginner_Examples from PySide import QtGui, QtCore reply = QtGui.QMessageBox.question(None, "", "This is your chance to answer, what do you think?", QtGui.QMessageBox.Yes | QtGui.QMessageBox.No, QtGui.QMessageBox.No) if reply == QtGui.QMessageBox.Yes: # this is where the code relevant to a 'Yes' answer goes pass if reply == QtGui.QMessageBox.No: # this is where the code relevant to a 'No' answer goes passCaesar卢尚宇2020年3月24日 来源:

Pyside QProcess Need Help

青春壹個敷衍的年華 提交于 2020-03-24 03:56:32
问题 NOTE : class MyWindow(QWidget): In init self.proc = QtCore.QProcess(self) self.te = QTextEdit(self) self.btn = QPushButton("Execute", self) self.btn.clicked.connect(self.__event_btn) Now I have this: def __event_btn(self): w_dir = "" # This set to my working directory where my C files are args = ["-o", "MyFile", "MyFile.c"] cmd = "gcc" self.proc.setWorkingDirectory(dir) self.proc.readyReadStandardOutput.connect(self.__read) self.proc.closeWriteChannel() self.proc.setReadChannel(QtCore

Pyside: addToJavaScriptWindowObject not working properly when application is compiled with cython

筅森魡賤 提交于 2020-03-22 03:39:13
问题 I have built an application that runs a couple thousand of lines of code. I am trying to hide the codes by compiling the python codes to c codes and then to an object file. This application works well in pyside. I converted this python file . py to a .c file and compiled the c to and object file .o . The name of this file is test2.py and my steps to convert it to an .o file: cython --embed -o test2.c test2.py from the above I now compile the test2.c to test2.o as follows gcc -I /usr/include

How to deal with PyCapsule type inside Python

╄→尐↘猪︶ㄣ 提交于 2020-03-20 11:59:33
问题 I'm trying to pass the object from QtGui.QWidget.effectiveWinId() to win32gui.SetWindowLong() effectiveWinId() is returning: <capsule object NULL at 0x027C9BF0> <class 'PyCapsule'> and SetWindowLong() expects a PyHANDLE (doc says it "should" accept an integer also) TypeError: The object is not a PyHANDLE object So my question is how do I grab the value out of a PyCapsule object and or check if its NULL? It seems PyCapsule is all internal API to the C code. Also I found this bug that does

How to deal with PyCapsule type inside Python

☆樱花仙子☆ 提交于 2020-03-20 11:59:09
问题 I'm trying to pass the object from QtGui.QWidget.effectiveWinId() to win32gui.SetWindowLong() effectiveWinId() is returning: <capsule object NULL at 0x027C9BF0> <class 'PyCapsule'> and SetWindowLong() expects a PyHANDLE (doc says it "should" accept an integer also) TypeError: The object is not a PyHANDLE object So my question is how do I grab the value out of a PyCapsule object and or check if its NULL? It seems PyCapsule is all internal API to the C code. Also I found this bug that does

Toggle QPen for selected items after QGraphicsScene selection change

我们两清 提交于 2020-03-19 07:55:34
问题 How can I toggle the QPen color for the selected graphicsview items? Ideally I would like to handle this color change in the graphicsview or graphics scene objects rather than directly handling it in the main windows selection event. Any help is appreciated. Currently it will turn the pen color white when the object is selected. I'm not sure how to turn it back avoiding looping through all objects. Is there a way i could add a function in the MyGraphicsView class itself that would handle the

pyside direct load ui file

℡╲_俬逩灬. 提交于 2020-03-17 02:12:32
某厂面试归来,发现自己落伍了!>>> https://github.com/lunaryorn/snippets/blob/master/qt4/designer/pyside_dynamic.pyhttps://github.com/lunaryorn/snippets/blob/master/qt4/designer/pyside_dynamic.py 来源: oschina 链接: https://my.oschina.net/u/1586288/blog/469246