pyside

Custom Qt Widgets with python for Qt Designer

怎甘沉沦 提交于 2019-12-04 09:31:16
问题 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 are: What steps are involved to make a a custom widget appear in the Widget Box of Qt Designer? If you can spare the time: Please provide a minimum working example (like a widget with a label in it saying "A truly minimal working Qt custom widget

Unable to Launch Qt uic

故事扮演 提交于 2019-12-04 08:21:49
I have installed Qt designer 4.8.2, Pyside, and Python 3.3. When I create a form with Qt designer I am not able to see the code when clicking on view code. The error message is:"Unable to launch C:\Qt\4.8.2\bin\uic". I have the pyuic under C:\Python33\Lib\site-packages\PyQt4\uic. Please help. Although you can certainly use Qt Designer for creating UIs for PySide/PyQt, you should be aware that it is primarily a C++ tool - it doesn't have any built in support for Python. So the "View Code..." command you refer to only produces C++ code - which is probably not much use to you if you intend using

Virtual column in QTableView?

情到浓时终转凉″ 提交于 2019-12-04 06:42:18
I'm started to learning Qt4 Model/View Programming and I have beginner question. I have simple application which show sqlite table in QTableView : class Model(QtSql.QSqlTableModel): def __init__(self, parent=None): super(Model, self).__init__(parent) self.setEditStrategy(QtSql.QSqlTableModel.OnFieldChange) self.setTable("test") self.select() class App(QtGui.QMainWindow): def __init__(self, model): QtGui.QMainWindow.__init__(self) self.ui = Ui_MainWindow() self.ui.setupUi(self) self.ui.tableView.setModel(model) if __name__ == "__main__": myDb = QtSql.QSqlDatabase.addDatabase("QSQLITE") myDb

Override shouldInterruptJavaScript in QWebPage with PySide

亡梦爱人 提交于 2019-12-04 06:14:02
问题 I would like to override PySide.QtWebKit.QWebPage.shouldInterruptJavaScript() slot to silently ignore JavaScript interrupt requests. I have my own timeout timer setup and I do not need a default message dialog. Quoting PySide documentation: Because of binary compatibility constraints, this function is not virtual. If you want to provide your own implementation in a PySide.QtWebKit.QWebPage subclass, reimplement the QWebPage.shouldInterruptJavaScript() slot in your subclass instead. QtWebKit

pyside-rcc “dyld: Library not loaded:…”

半城伤御伤魂 提交于 2019-12-04 05:31:43
问题 I'm a python and Qt rookie and I have some problems running pyside-rcc (and pyrcc4). The problem is not the link to the executable but a library problem it seems. That I'm not a unix wizard, probably doesn't help either:) When I run $ pyside-rcc i get the following error dyld: Library not loaded: @rpath/lib/QtCore.framework/Versions/4/QtCore Referenced from: /Users/[USERNAME]/Library/Enthought/Canopy_64bit/User/bin/pyside-rcc Reason: image not found Trace/BPT trap: 5 For $ pyrcc4 the error is

Where is pyside-uic?

。_饼干妹妹 提交于 2019-12-04 05:30:22
I'm trying to use Qt Designer and pyside-uic mydesign.ui > design.py however, this program doesn't exist. I looked in site packages under python 2.7, and I see: pyside-lupdate.exe pyside-rcc.exe and a bunch of other programs, but there is no such thing as pyside-uic.exe ... why ?? Why is it missing from the installation package? Where do I get it? You should see a /Python27/Scripts/pyside-uic.exe. But I'm wondering why it's not visible (not executable). Maybe it's a packaging problem (permissions, etc). You could try to call it using the complete path. If you installed PySide with homebrew,

How to cancel font shadow in nuke pyside

匆匆过客 提交于 2019-12-04 05:19:47
问题 I have a UI, which automatically sets font shadow in nuke, and how to cancel it. I want the font on this button to look like this, so there is no font shadow. This is my code,Thanks:) # -*- coding:utf-8 -*- from PySide import QtGui class MyButton(QtGui.QDialog): def __init__(self,parent=None): super(MyButton, self).__init__(parent) v_layout = QtGui.QVBoxLayout(self) btn = QtGui.QPushButton("Submit") v_layout.addWidget(btn) self.setStyleSheet(""" QPushButton{ height: 50px; border: 0px solid

set application name in pyside

血红的双手。 提交于 2019-12-04 05:19:46
问题 I created an Application using Qt Creator/Designer under Windows 8 and Qt 5 it starts as follow class Ui_MainWindow(object): def setupUi(self, MainWindow): #MainWindow.setApplicationName("Facturo-Pro") # this doesn't work MainWindow.setWindowIcon(QtGui.QIcon('icons/app.png')) MainWindow.setObjectName("MainWindow") MainWindow.setMinimumSize(QtCore.QSize(800, 600)) MainWindow.setLocale(QtCore.QLocale(QtCore.QLocale.English, QtCore.QLocale.UnitedStates)) i want to set the application name which

Pandas df in editable QTableView: remove check boxes

主宰稳场 提交于 2019-12-04 04:00:57
问题 I have a pandas dataframe that I would like to present in a QtableView and make it editable. I have create the below model, but for some reason the output has checkboxes in every field. How can I get rid of them? The outout looks like this: And this this is the model that is used to make the pandas dataframe shown in a qtavleview and make it editable (I'm using PySide) class PandasModelEditable(QtCore.QAbstractTableModel): def __init__(self, data, parent=None): QtCore.QAbstractTableModel._

Recommended way for installing PySide on Ubuntu

心已入冬 提交于 2019-12-04 01:53:58
What is the recommended way of setting up PySide for development in Ubuntu? sudo apt-get install python3-pyside ? sudo pip install pyside ? sudo easy_install pyside ? All your options will work. It depends what you are trying to achieve with it and how portable it should be. What usually "just" works without problems is to create a virtualenv first: apt-get -f install python-virtualenv virtualenv ~/mypython2.7 With that you can simply use easy_install as recommended to install PySide in your local virtual environment: ~/mypython2.7/bin/easy_install PySide If you want to build PySide, follow