[PySide] Question from a newbie
krecoun at gmail.com
Sun Dec 22 18:15:41 CET 2013
my name is Vojtěch Polášek and I am a blind student from czech Republic.
I am creating an application in Pyside with Python 3.2. I would like to
create a sudoku game accessible for blind and visually impaired people.
I have created a main window, added a widget which contains 81 buttons
in a grid layout. Now my idea is, that after pressing a button, that
button would disappear and would be replaced by some other controll
which would allow you to change the value. I chose QSpinBox for now.
This step works well, although I had to implement my own eventfilter,
because QT in Linux uses arrows to browse available elements on the
screen. Never mind.
Now this is the way in which I replace a button with a spinbox. This
function is connected to the QPushButton.clicked signal:
self.grid.addWidget(self.spinbox, senderpos, senderpos)
print ('value set')
Don't mind those print statements, they are there for debugging
purposes, because I haven't found a way of debugging Pyside with PDB.
The problem is, that this signal is also called after I press a button
and this function is executed. I don't manipulate with spinbox in any
manner. Only thing that is set is its accepted range of input.
What could be the problem?
I am attaching the source code.
Thank you very much,
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 2601 bytes
Desc: not available
More information about the PySide