From dc.loco at gmail.com Thu Dec 1 17:16:10 2016 From: dc.loco at gmail.com (Kevin Cole) Date: Thu, 1 Dec 2016 11:16:10 -0500 Subject: [PySide] I don't understand why I'm getting QPainter::begin: Widget painting can only begin as a result of a paintEvent - Stack Overflow In-Reply-To: References: Message-ID: I'm stuck. I don't ever explicitly call paintEvent. I create a QPainter() instance inside of a paintEvent method and I get that error. Reduced code example at: http://stackoverflow.com/questions/40872318/i-dont-understand-why-im-getting-qpainterbegin-widget-painting-can-only-beg (I'm not really understanding the whole graphics framework. I still find the coordinate system bafflingly unpredictable. And I don't know C++. So the original Qt docs on line aren't much use to me.) -------------- next part -------------- An HTML attachment was scrubbed... URL: From dc.loco at gmail.com Thu Dec 1 21:04:19 2016 From: dc.loco at gmail.com (Kevin Cole) Date: Thu, 1 Dec 2016 15:04:19 -0500 Subject: [PySide] I don't understand why I'm getting QPainter::begin: Widget painting can only begin as a result of a paintEvent - Stack Overflow In-Reply-To: References: Message-ID: Thanks to ekhumoro (http://stackoverflow.com/users/984421/ekhumoro) for a solution to my recent dilemma. From dc.loco at gmail.com Sat Dec 3 02:59:46 2016 From: dc.loco at gmail.com (Kevin Cole) Date: Fri, 2 Dec 2016 20:59:46 -0500 Subject: [PySide] Differences between PySide 1.2.4 on Mac OS X and Pyside 1.2.2 on Ubuntu Linux? Message-ID: Hi, I'm seeing different behavior between the two OS with coordinates and full screen. The code queries the OS for the screen dimensions and then expands occupy the full screen. On Linux my code draws a circle on the background in the center of the screen occupying most of the screen, and then draws eight squares symmetrically around it. It also places a smaller circle in the center as a graphics item. This item is immobile. On Mac OS X the same code draws a much smaller background circle in the center of the screen, and all eight squares are placed on top of each other -- or only one square is drawn, but I'm pretty certain it's the former. On Linux a second mobile graphics item stops moving when I hit the edge of the screen. The two circles stay put. On Mac OS X the same code causes scroll bars to appear as the mobile graphics item hits the walls (and the tiny circles start moving in the opposite direction from the moving graphics item as soon as one starts to move it. So that means the... view? is moving as well as the mobile graphics item. It's stationary on Linux.) Can anyone clue me into what might be wrong? From dc.loco at gmail.com Sun Dec 4 17:04:53 2016 From: dc.loco at gmail.com (Kevin Cole) Date: Sun, 4 Dec 2016 11:04:53 -0500 Subject: [PySide] Workaround for BadCursor errors? Message-ID: Hi, I'm on Ubuntu Linux Yakkety (16.10), PySide 1.2.2. I'm trying to set the cursor shape and then restore it to its default at a later time. Initially, I tried self.setCursor(Qt.BlankCursor) and self.setCursor(Qt.ArrowCursor) on the QGraphicsSvgItem. When that failed I went to: http://stackoverflow.com/questions/8218900/how-can-i-change-the-cursor-shape-with-pyqt Using QApplications.setOverrideCursor(QCursor(Qt.BlankCursor)) failed with: X Error: BadCursor (invalid Cursor parameter) 6 Major opcode: 2 (X_ChangeWindowAttributes) Resource id: 0xa Switching to QApplications.setOverrideCursor(Qt.BlankCursor) -- i.e. using just the shape -- worked. However, the restoreOverrideCursor failed with the error above, and exiting the program complains: X Error: BadCursor (invalid Cursor parameter) 6 Major opcode: 95 (X_FreeCursor) Resource id: 0xa