20 Topics
|
|
Hello!!I have a database and I want to display its data into a QTreeView in PyQt.The database's column has file paths.I have a problem in filling this treeview with data because it's a database and I'm not sure if it is like working with txt files and because it is … |
|
Hello!First of all,I'm so sorry for this huge post!!I wrote the whole code from the book,that's why the post is so big!!I'm reading this book : Rapid Gui Programming with Python and Qt.And I have problem understanding some parts of the code.I would be really thankful if someone could help … |
|
I have this as my major code #!/usr/bin/env python # # @author: Joseph Rex # @website: http://josephrex.me # @repository: http://github.com/bl4ckdu5t/registron # # # import sys, webbrowser from PyQt4 import QtGui, QtCore from ui_registron import Ui_MainWindow try: import pyttsx except ImportError: raise ImportError, "pyttsx module is required for speech features of … |
|
Hi need help passing an argument through signal emitted from a function at module level, when the function is executed I want to emit a signal with an argument whose value i want to pass to the method that is connected to that signal in the class in that same … |
|
I have made a QTableView that displays images from disk, there are two seriously agonizing problem I am facing. First of after the windows shows up making it maximize or changing size of window is very slow, and secondly I want to display images height width dependong on what can … |
|
How do I display images in QListView of size of standard thumbnail size like 250 x 200 , and file nametext should wrap to next line , right now the images displayed are very small and are not positioned under each other in proper row column order. import sys import … |
|
How do I rotate image in this code every n seconds http://pastebin.com/SKDzuC15 lets say i want to change the image in pixmap after 5 seconds to next image, what is happening right now the last one gets displayed. |
|
It seems like the slotDirChanged is getting executed twice, becuase everything seems to be working fine, import datetime from PyQt4 import QtGui,QtCore from PyQt4.QtCore import pyqtSlot import sys import os class WatchFilesBin(QtGui.QMainWindow): def __init__(self, lookinpath=None): super(WatchFilesBin, self).__init__() self._filesBinPath = lookinpath createFilesBin(self._filesBinPath) self.filesList = os.listdir(self._filesBinPath) print self.filesList self.fileSysWatcher = QtCore.QFileSystemWatcher() def … |
|
in the designer when i right click a widget, and i click promote to i get this window? see attached screenshot what is it for ? does that mean i can create a new class in this case inherit QLineEdit and add more methos to it ? how can i … |
|
I am trying to load the help on each method into a QTextEdit in PyQt4 how can I have this variable hold help on a method, example: `data = os.system('python -c "import sys; help(sys.path)"')` but data value contains `0` |
|
I am trying to remove a column from PyQt4 implementation of table model , however I am not able to figure it out what I am doing wrong def removeColumns(self, position, columns, parent = QtCore.QModelIndex()): self.beginRemoveColumns(parent, position, position + columns - 1) #Do removing here rowCount = len(self.__colors) for i … |
|
I wrote this function earlier to set the priority if the items in listwidget, however what I think would be more pythonic is to write get and set priority method... how should i proceed with writing the method in a pythonic way ? def changePriority(self,direction): """ Reorder the items in … |
|
Can anyone please suggest me best practice to create a Custom widget using QtDesigner? I want to see how to approach adding Qpushbutton or QCheckboxGroup inside the cells of QTable Widgets that will be added on user clicking add new row to QTable at runtime |
|
I recently made an appication that utilizes pyqt , i could say i wrote the code pythonic and made everything work work as I wanted, but didnt used any data model , so later I realized I could have used data model since I am building list in the QListView … |
|
I have made an standalone app inheriting from base class `QtGui.QFrame`, and now i want to add a floating toolbar to it the way I could have in QMainWindow, how should I do it ? |
|
from PySide import QtCore,QtGui import sys class ToolBarUI(QtGui.QMainWindow): def __init__(self,*args,**kwargs): super(ToolBarUI,self).__init__(*args,**kwargs) self.floatingToolBar() pass def buttons(self): self.btnVLay=QtGui.QVBoxLayout() self.incSavbtn=QtGui.QPushButton("Save") self.emailbtn=QtGui.QPushButton("Email") self.upldbtn=QtGui.QPushButton("Upload") self.setPrjbtn=QtGui.QPushButton("Set Project") self.setThumb=QtGui.QPushButton("Set thumb") self.shwMatbtn=QtGui.QPushButton("Show Material") self.fixtexbtn=QtGui.QPushButton("Fix Texture Paths") btns = [self.incSavbtn,self.emailbtn,self.upldbtn,self.setPrjbtn,self.setPrjbtn,self.setThumb,self.shwMatbtn,self.fixtexbtn] [self.btnVLay.addWidget(each) for each in btns] def floatingToolBar(self): self.buttons() self.setLayout(self.btnVLay) self.show() pass if __name__ =='__main__': app = QtGui.QApplication(sys.argv) app.setStyle("cleanlooks") win … |
|
how do i make use of seticon inherited by QCheckBox to display icon with exclusive checkboxes i found a link here but doesnt have any example how to do so http://riverbankcomputing.co.uk/static/Docs/PyQt4/html/qabstractbutton.html#setIcon |
|
The UI is as following . http://img.my.csdn.net/uploads/201211/03/1351957960_1171.jpg What I want is : When I press the Enter key ,the label should shows “Enter” When I press The blank space key ,the label should shows “space” How to implement this ? I know I should reimplement the keyPressEvent handler ,but I … |
|
While I was trying to write a small program to preview DjVu files I encountered a peculiar problem. This is a small function that renders a page of a DjVu document into QImage class of PyQt4. import djvu.decode as DjVu from PyQt4.QtCore import QImage from PyQt4.QtGui import QPixmap, QApplication, QLabel … |
|
I am trying to grab the string/object from the treeview. So when a user click on any item in the treeview, I can show it on the terminal. ANy help is appreciated.Here is the code. QtCore.QObject.connect(self.treeWidget, QtCore.SIGNAL("clicked(QModelIndex)"), self.treefunction) def treefunction(self, index): print index Output on clicking the item in treeview … |
The End.