Questions tagged [pyside]

Questions about using PySide, a Python Qt bindings project.

The PySide project provides LGPL-licensed Python bindings for the Qt cross-platform application and UI framework. PySide Qt bindings allow both free open source and proprietary software development and ultimately aim to support all of the platforms as Qt itself.

3517 questions
9
votes
3 answers

How to pan beyond the scrollbar range in a QGraphicsview?

I am building a node graph in a QGraphicsView and I am currently implementing panning. I used the following question "how to pan images in QGraphicsView" to start but the panning is limited by the scrollbar range. I also tried the translate method…
LBarret
  • 1,113
  • 10
  • 23
9
votes
3 answers

Custom Qt Widgets with python for Qt Designer

I am trying to write a custom widget for the Qt Designer using only Python. I was following a couple of tutorials I found online but none of them were working or anything close to what I would call to be a minimum working example. So my questions…
Woltan
  • 13,723
  • 15
  • 78
  • 104
9
votes
2 answers

How to pop out a separate window from a tabWidget in PySide Qt

I have an extended main window with a QtGui.QTabWidget added to it. I am creating several widgets extended from QtGui.QWidget which I can add and remove to the tab widget. What I would like to do is have a "pop-out" button that causes the child…
Laura Huysamen
  • 398
  • 3
  • 9
9
votes
1 answer

pyside show / hide layouts

I'm trying to display one of two layouts depending on whether a checkbox is checked or not. Only using widgets I can do the following which works fine: (each widget in this example is a QLineEdit) myCheckbox.stateChanged.connect(switchControls) def…
user985366
  • 1,635
  • 3
  • 18
  • 39
9
votes
2 answers

Edit table in pyqt using QAbstractTableModel

I'm trying to create an editable table in PyQt. Here's the code for just displaying the table: import sys from PyQt4 import QtGui, QtCore from PyQt4.QtCore import * from PyQt4.QtGui import * # données à représenter my_array = [['00','01','02'], …
nam
  • 3,542
  • 9
  • 46
  • 68
8
votes
1 answer

QSettings(): How to save to current working directory

For an app that can be run directly from a flash/pen/usb/jump/thumb drive, for portability in moving from one machine to another it can make sense for user settings to be stored on the memory stick in the same directory that the program is being run…
gseattle
  • 986
  • 1
  • 14
  • 23
8
votes
5 answers

PyQt/PySide - icon display

I have a PySide app which has an icon for the MainWindow (a QMainWindow instance). When I run the file normally, the icon is visible and everything is fine but when I create an exe with py2exe, the icon does not appear. This happens with cx_freeze…
user547057
  • 313
  • 3
  • 10
8
votes
1 answer

Can't use PySide with Anaconda

I have just installed Anaconda for Python 3 and then installed PySide by sudo apt-get install python3-pyside Then I tried to use it throw Anaconda's version of python and typed import PySide but gave me this error ImportError: No module named…
JavaBeg2016
  • 93
  • 2
  • 7
8
votes
1 answer

Remove scrollbar to show full table

I have a scrollview to which I dynamically add QTableWidgets. However, the QTables themselves also have scrollbars and therefore don't show the full table. Is there a way to disable the scroll bar so that the table always gets shown in full? EDIT:…
chrise
  • 4,039
  • 3
  • 39
  • 74
8
votes
2 answers

PySide Application with asynchronous function execution

I have a sample pyside demo which I created to see the webkit browser communication with python... I have two buttons in webkit button 1 - when clicked it sleeps for 10 seconds and then prints a message button2 - when clicked it prints a message…
repzero
  • 8,254
  • 2
  • 18
  • 40
8
votes
3 answers

How to round QWidget corners

I wonder if there is there a way to round Qt widget corners? from PyQt4 import QtCore, QtGui class Custom(QtGui.QWidget): def __init__(self, *args, **kwargs): QtGui.QWidget.__init__(self, *args, **kwargs) …
alphanumeric
  • 17,967
  • 64
  • 244
  • 392
8
votes
1 answer

How to align right and vertically center in QAbstractTableModel?

The Qt.AlignRight right aligns the text but puts it into the right-top corner. The Qt.AlignRight | Qt.AlignVCenter doesn't work. Puts it into the left-top corner. Is there a way to keep the text vertically centered and right aligned at the same…
Norbert Sebők
  • 1,208
  • 8
  • 13
8
votes
1 answer

Dockable window in Maya with PySide clean up

I created a tool that is able to dock in Maya's main ui, but I can't figure out a way to clean it up once it closes. The problem is if I create multiple instances of the tool then drag it in place to dock it, they will ALL show up when I right-click…
Green Cell
  • 4,677
  • 2
  • 18
  • 49
8
votes
3 answers

QtConcurrent in PySide/PyQt

I'm trying to figure out if subclassing QtConcurrent and writing a run method inside it will work: class Task(QtCore.QtConcurrent): def run(self, function): function() Or is it completely useless?
Elteroooo
  • 2,913
  • 3
  • 33
  • 40
8
votes
1 answer

Can't hide or disable the close button on QWizard

A QWizard dialog by default has a context help [?] and a close [X] button in the top right corner. I can hide the context help button, but I can't get the close button to disappear using setWindowFlags. For example: # preserves current window flags…
101
  • 8,514
  • 6
  • 43
  • 69