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
1
vote
0 answers

Open QDialog from QThread and getting return data?

I have a scenario where I am outsourcing my execution part to QThread and during execution i have a need to launch QDialog to take some user inputs within QThread. For scenario where QDialog calls are not in picture is working fine but for snippet…
Pawankumar Dubey
  • 387
  • 1
  • 6
  • 21
1
vote
1 answer

Return top items from QTreeview selection Pyside

I have a QTreeview and based on the users selection I would like to get a unique array containing all the names of the parents of the selected items. So if any children are selected it would return the parent and if a parent is selected it would…
JokerMartini
  • 5,674
  • 9
  • 83
  • 193
1
vote
0 answers

PySide - QListView creating new item during drag and drop rather than passing original

I am writing a PySide application with a QListView. This QListView allows drag and drop events to change the order of the items it displays. The QListView uses a QStandardItemModel, and the QStandardItemModel contains QStanardItem objects. I have…
Johndt
  • 4,187
  • 1
  • 23
  • 29
1
vote
1 answer

Paint ticks on custom QProgressBar in Pyside

I'm trying to paint some ticks in my custom progressbar but I'm not clear on why the line isn't showing up at all? import sys import…
JokerMartini
  • 5,674
  • 9
  • 83
  • 193
1
vote
1 answer

Make QProgress bar snap in increments of 5 Pyside

I have created a custom progress bar which allows users to click and drag to choose their desired percent value. I was wondering how can I make it snap in increments of 5? Ideally I'll make this a property the user can set when using the…
JokerMartini
  • 5,674
  • 9
  • 83
  • 193
1
vote
1 answer

cefpython to take screenshot of current html (optional: specific elements)

I use cefpython inside PySide on Python 2.7. To create advanced 3d transitions between div's I have to cut the div in e.g. 20 parts which I can animate separately. I found no way to do that "natively" so I have to simulate the split by taking a…
fameman
  • 3,451
  • 1
  • 19
  • 31
1
vote
0 answers

draggable items in QListView

I'm trying to create a list-widget where the uesr can rearrange the elements by dragging them within the widget, using PySide-1.2.2/Qt-4.8.7 This is pretty simple with a simple QListWidget: from PySide.QtCore import * from PySide.QtGui import…
umläute
  • 28,885
  • 9
  • 68
  • 122
1
vote
1 answer

Can I run a QApplication serially?

I am trying to make a class that can take either a list of urls or a single url and render them. In the list case it renders them all and makes available a dictionary containing all the htmls. This works fine. In the single case it takes a url,…
GreySage
  • 1,153
  • 19
  • 39
1
vote
2 answers

how to get the current widget's cursor size in pixels

How to get the current mouse cursor size measured in pixels? I tried mywidget.cursor().pixmap().size() but it returns (0,0) for the standard arrow cursor. (I need this to show a special tool tip label which would appear just below the cursor and…
1
vote
1 answer

AttributeError: 'FaderWidget' object has no attribute 'pixmap_opacity'

I found a great example on how to do a fade between two widgets. Now, what I'm trying to do here, is to split every widgets I build in their own classes. The problem with the code at this stage is in the editor_ class, the line:…
1
vote
2 answers

Setting row Span in QTableView using Python?

I am trying to set rowspan on second column of my QTableView but somehow logically i am missing something. i am only able to get A and B but not C. Plus i am getting warning QTableView::setSpan: span cannot overlap and QTableView::setSpan: single…
Pawankumar Dubey
  • 387
  • 1
  • 6
  • 21
1
vote
1 answer

How to enable a LineEdit when a CheckBox is checked

I need to make a macro in Python. I want to enable a QlineEdit when a QCheckBox is checked; how do I do it? This is the code: import os, sys, App from PySide2 import QtCore, QtGui, QtWidgets from PySide2.QtWidgets import * from PySide2.QtCore import…
Silenzio76
  • 53
  • 7
1
vote
0 answers

Dynamically resize buttons in a Pyside GUI and manage Layouts

I have read the documentation on the following matter, but QtGui is so overwhelmingly complex I might have missed the piece. I have created a GUI, in which it consists of a menubar two QLabel and two QLineEdit and a button. The issue I am facing in…
Raghavendra MG
  • 89
  • 2
  • 11
1
vote
0 answers

How to index a widget inside of a QGridLayout

I'm trying to create a matrix of widgets in PySide with Python3. The creation is working already but I cannot update the widgets. I create a QGridLayout, then I add label widgets with an initial text. After this I build a list of 30 instances of the…
EinSoldiatGott
  • 63
  • 1
  • 11
1
vote
1 answer

Does Qt Designer or associated Qt tool have a global find-and-replace functionality for the xml formatted *.ui files?

My specific problem right now is relates to a roughly 4,800 line .ui file that I’ve created in Qt Designer in which I need to do some basic refactoring (renaming widgets). I convert the .ui file to a python file via pyside-uic. I’ve gone over the…
airhuff
  • 413
  • 6
  • 18