pyside

Failed to find the MSVC compiler version 10.0 on your system

梦想与她 提交于 2019-12-30 10:35:49
问题 Trying to install PySide and I am getting this error: running build Python architecture is 64bit nmake not found. Trying to initialize the MSVC env... Searching MSVC compiler version 10.0 error: Failed to find the MSVC compiler version 10.0 on your system. I have minGW, QT 4.8 vs 2010 and mingw versions, Cmake. Now I have a feeling that something is missing from my PATH, but I'm not sure where and what should it point. My current PATH: C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:

QtDesigner & PySide: QTableWidget don't get accessible

二次信任 提交于 2019-12-30 10:10:49
问题 I made a form in QtDesigner. This form gets loaded from PySide with help of the function widget = loader.load(file, parent) However, the QTableWidget (with objectNname buffer_table) don't get accessible with widget.buffer_table If I use a QPushButton instead it works. How can I get this working. I'd like to fill up the table in Python. This is the ui-file i'd like to use: http://pastebin.com/6PZFrvmr EDIT: When I create a new table and try to load it, it seems to work. However, if I put it in

How can you easily select between PyQt or PySide at runtime?

◇◆丶佛笑我妖孽 提交于 2019-12-30 09:43:31
问题 I would like to do something like this in one source file, QT.py: import sys import PyQt4 sys.modules["Qt"] = PyQt4 Then import this file in the other source files, and use it like this: import QT from Qt.QtCore import * So I can change from PyQt4 to PySide in QT.py without touching all the source files (with a possibly ugly sed script) These modules are mostly API compatibile and I would like to test them both. Is there an easy way to do this? (Because the ways I tried are not working) Maybe

How can you easily select between PyQt or PySide at runtime?

≡放荡痞女 提交于 2019-12-30 09:43:18
问题 I would like to do something like this in one source file, QT.py: import sys import PyQt4 sys.modules["Qt"] = PyQt4 Then import this file in the other source files, and use it like this: import QT from Qt.QtCore import * So I can change from PyQt4 to PySide in QT.py without touching all the source files (with a possibly ugly sed script) These modules are mostly API compatibile and I would like to test them both. Is there an easy way to do this? (Because the ways I tried are not working) Maybe

MousePressEvent, position offset in QGraphicsView

倾然丶 夕夏残阳落幕 提交于 2019-12-30 08:38:31
问题 I've some difficulties with QGraphicsView and QGraphicsScene . When I zoom/unzoom in the scene and create items with mousePressEvent, I have an offset in the position. How can this be avoided? event.pos() seems to be the problem.. from PyQt4 import QtCore, QtGui class graphicsItem (QtGui.QGraphicsItem): def __init__ (self): super(graphicsItem, self).__init__() self.rectF = QtCore.QRectF(0,0,10,10) def boundingRect (self): return self.rectF def paint (self, painter=None, style=None, widget

Getting PySide to work with matplotlib

瘦欲@ 提交于 2019-12-28 05:15:01
问题 I have tried running the example code on the SciPy website, but I get this error: Traceback (most recent call last): File ".\matplotlibPySide.py", line 24, in <module> win.setCentralWidget(canvas) TypeError: 'PySide.QtGui.QMainWindow.setCentralWidget' called with wrong argument types: PySide.QtGui.QMainWindow.setCentralWidget(FigureCanvasQTAgg) Supported signatures: PySide.QtGui.QMainWindow.setCentralWidget(PySide.QtGui.QWidget) I am building a simple scientific data logger that will

PyQt UI event control segregation

感情迁移 提交于 2019-12-25 17:55:32
问题 I am a beginner in python but my OOPS concept from Java and Android are strong enough to motivate me in making some tool in python. I am using PyQt for developing the application. In my application there are lot of QTabWidget used and has lot of UI controls in each TAB widget. Please see the screenshot for the same. All of the event control of entire tool i have kept in one single file but now i want to segregate it based on one individual python file per QTab for event control inside the Tab

Button Icon Change on Click

一曲冷凌霜 提交于 2019-12-25 16:54:07
问题 I'm trying to make a GUI Application that change the icon on the right clicked button! This is my simple code: import sys from PySide.QtCore import * from PySide.QtGui import * class Ui_MainWindow(QMainWindow): def __init__(self): super().__init__() self.setupUi() def setupUi(self): widget = QWidget() layout = QGridLayout() self.buttons = list() for x in range(3): row = list() for y in range(3): button = QPushButton(QIcon('Empty-Cell.png'), '{},{}'.format(x, y)) button.clicked.connect(self

How to most efficiently implement a PySide QListView/QAsbtractItemView for an SQLAlchemy table?

痞子三分冷 提交于 2019-12-25 13:29:27
问题 Suppose I have a class Client (subclassing sqlalchemy.ext.declarative.declarative_base), giving me an SQL table of clients. Each client has a name, a number and an image path. (Of course there are more variables in real) What I want, is a vertical list of panels in my GUI, where each panel includes the client's image, name and number. The panel should be clickable and show an optical response OnMouseOver. Further, the list of these items should allow to be reordered (e.g. by number, surname,

Spider Run button doesn't behave as expected

冷暖自知 提交于 2019-12-25 11:52:47
问题 I am a newbie with python and today I have tried to set the Spyder IDE to run PySide clases in order to make some applications. The thing is, once Spyder was installed (Spyder (Python 2.7) in Ubuntu) I tried to launch a hello world in order to check if all was correctly tied up. Before installing Spyder I had Python 2.7 with the PySide packages properly intalled. This is what my PySide Hello World program look like: import sys from PySide.QtCore import * from PySide.QtGui import * # Create a