pyside

QWizard: Change height/dimensions of title field

杀马特。学长 韩版系。学妹 提交于 2021-01-28 12:18:56
问题 I'm currently trying to implement a simple "First steps" Wizard for a Python/Qt application I'm working on. This is really easy to do with Designer, but as usual the devil lies in the details. My problem is that the 'Title' field is way too big for me (~50% of the available screen estate). Here is a screenshot, and there the *.ui-file. I've already had a look at all the QWizard/QWizardPage properties and couldn't find anything that referred to the size/styling of the 'Title' field. Is there

Drag and Drop of subclassed QListWidgetItem

非 Y 不嫁゛ 提交于 2021-01-28 10:07:58
问题 I'm encountering some poblems trying to implement drag and drop for a custom QListWidgetItem. Here is some example code: from PyQt4 import QtGui, QtCore import sys, os class MyListWidgetItem(QtGui.QListWidgetItem): def __init__(self, label, data, parent=None): super(QtGui.QListWidgetItem, self).__init__(label, parent=parent) self.data = data def GetData(self): return self.data class MyListWidget(QtGui.QListWidget): def __init__(self, type, parent=None): super(MyListWidget, self).__init__

Drag and Drop of subclassed QListWidgetItem

元气小坏坏 提交于 2021-01-28 10:03:54
问题 I'm encountering some poblems trying to implement drag and drop for a custom QListWidgetItem. Here is some example code: from PyQt4 import QtGui, QtCore import sys, os class MyListWidgetItem(QtGui.QListWidgetItem): def __init__(self, label, data, parent=None): super(QtGui.QListWidgetItem, self).__init__(label, parent=parent) self.data = data def GetData(self): return self.data class MyListWidget(QtGui.QListWidget): def __init__(self, type, parent=None): super(MyListWidget, self).__init__

Add additional information to items in a QTreeView/QFileSystemModel

北战南征 提交于 2021-01-28 08:53:28
问题 I would like to render each item in a QTreeView differently based on a number of attributes stored in a database and based on whether the item is a folder or a file. However, I don't understand how the QTreeView or QFileSystemModel communicate with the delegate. Whenever an item must be drawn, including during initialization, I'd expect to provide the delegate with all the parameters it requires and then use a series of if statements within the delegate to set how the particular item is drawn

Radio buttons in qtablewidget using pyside

笑着哭i 提交于 2021-01-28 05:44:02
问题 I have created a QTableWidget having four columns. The first column is a text field and the remaining three are radio buttons. Objective is to make all radio buttons in a row exclusive. The code snippet is as below: #Create a table having one row and four columns searchView = QTableWidget(1,4) #Input data to create table dirNames = {'A':['/tmp', '/tmp/dir1'], 'B':['/tmp/dir2'], 'C':['/tmp/dir3']} #calculate the number of rows needed in table rowCount = len(dirNames["A"]) + len(dirNames["B"])

Why won't QToolTips appear on QActions within a QMenu

℡╲_俬逩灬. 提交于 2021-01-27 02:13:27
问题 I'm doing an app with in GUI written with PySide . I set a QMenu on a QPushButton , added several QActions via QMenu.addAction . To further explain these actions to the user I added QToolTip 's to these with QAction.setToolTip . When I run the GUI now my QToolTip won't show. The example posted below reproduces the same issue, any ideas? Thanks in advance import sys from PySide import QtGui class Example(QtGui.QPushButton): def __init__(self, parent = None): super(Example, self).__init__

Why won't QToolTips appear on QActions within a QMenu

你说的曾经没有我的故事 提交于 2021-01-27 02:12:44
问题 I'm doing an app with in GUI written with PySide . I set a QMenu on a QPushButton , added several QActions via QMenu.addAction . To further explain these actions to the user I added QToolTip 's to these with QAction.setToolTip . When I run the GUI now my QToolTip won't show. The example posted below reproduces the same issue, any ideas? Thanks in advance import sys from PySide import QtGui class Example(QtGui.QPushButton): def __init__(self, parent = None): super(Example, self).__init__

Why won't QToolTips appear on QActions within a QMenu

心不动则不痛 提交于 2021-01-27 02:10:23
问题 I'm doing an app with in GUI written with PySide . I set a QMenu on a QPushButton , added several QActions via QMenu.addAction . To further explain these actions to the user I added QToolTip 's to these with QAction.setToolTip . When I run the GUI now my QToolTip won't show. The example posted below reproduces the same issue, any ideas? Thanks in advance import sys from PySide import QtGui class Example(QtGui.QPushButton): def __init__(self, parent = None): super(Example, self).__init__

Why won't QToolTips appear on QActions within a QMenu

梦想与她 提交于 2021-01-27 02:09:05
问题 I'm doing an app with in GUI written with PySide . I set a QMenu on a QPushButton , added several QActions via QMenu.addAction . To further explain these actions to the user I added QToolTip 's to these with QAction.setToolTip . When I run the GUI now my QToolTip won't show. The example posted below reproduces the same issue, any ideas? Thanks in advance import sys from PySide import QtGui class Example(QtGui.QPushButton): def __init__(self, parent = None): super(Example, self).__init__

Why won't QToolTips appear on QActions within a QMenu

依然范特西╮ 提交于 2021-01-27 02:08:10
问题 I'm doing an app with in GUI written with PySide . I set a QMenu on a QPushButton , added several QActions via QMenu.addAction . To further explain these actions to the user I added QToolTip 's to these with QAction.setToolTip . When I run the GUI now my QToolTip won't show. The example posted below reproduces the same issue, any ideas? Thanks in advance import sys from PySide import QtGui class Example(QtGui.QPushButton): def __init__(self, parent = None): super(Example, self).__init__