Re: [PyQt] pylupdate4 issue
On 19/02/2012 09:55 م, Vincent Vande Vyvre wrote: Le 19/02/12 19:55, ad...@mbnoimi.net a écrit : On 19/02/2012 08:22 م, ad...@mbnoimi.net wrote: Hi all, I tried to create *.ts file for my project by using pylupdate4 so I tried the following commad but it didn't work! pylupdate4 *.py -ts %CD%\ui\l10n\ar.ts pylupdate4 error: Cannot open file '*.py': No error Could you please guide me to the correct path? PS I successfully created *.ts file for single *.py file. I forgot to mention that I want to create single *.ts file for many *.py files You must provide a .pro file to pyludate4 exemple of .pro file SOURCES = main.py\ ui_mainWindow.py\ otherFile.py\ etc TRANSLATIONS = appName_ar.ts CODECFORTR = UTF-8 CODECFORSRC = UTF-8 I don't want to use .pro because I've many files in many subdirecories which is very exhausting to write manually. -- Best Regards Muhammad Bashir Al-Noimi My Blog: http://mbnoimi.net ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[PyQt] Need help using QWebPluginFactory
Hello, I am having a bit of trouble using QWebPluginFactory.Plugin. I want to attach a MimeType object to it's mimeTypes list, but the list stays empty (s. below). What am I doing wrong? Python 3.2.2 (default, Oct 23 2011, 17:46:58) [GCC] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> from PyQt4.QtWebKit import QWebPluginFactory >>> p=QWebPluginFactory.Plugin() >>> p >>> p.mimeTypes [] >>> mt=QWebPluginFactory.MimeType >>> p.mimeTypes.append(mt) >>> p.mimeTypes [] >>> Regards, Detlev -- Detlev Offenbach det...@die-offenbachs.de ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
Re: [PyQt] Need help using QWebPluginFactory
On Mon, 20 Feb 2012 15:37:36 +0100, Detlev Offenbach wrote: > Hello, > > I am having a bit of trouble using QWebPluginFactory.Plugin. I want to > attach > a MimeType object to it's mimeTypes list, but the list stays empty (s. > below). > What am I doing wrong? > > Python 3.2.2 (default, Oct 23 2011, 17:46:58) [GCC] on linux2 > Type "help", "copyright", "credits" or "license" for more information. from PyQt4.QtWebKit import QWebPluginFactory p=QWebPluginFactory.Plugin() p > p.mimeTypes > [] mt=QWebPluginFactory.MimeType p.mimeTypes.append(mt) p.mimeTypes > [] PyQt (actually SIP) only supports the binding of attributes so you have to do something like... mime_types = p.mimeTypes mime_types.append(mt) p.mimeTypes = mime_types Phil ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
Re: [PyQt] spreadsheet example
Am Sunday 19 February 2012 12:47:28 schrieb Phil Thompson: > On Sat, 11 Feb 2012 01:36:14 +0100, "Hans-Peter Jansen" > > > wrote: > > Hi Phil, > > > > while I'm seriously overloaded at the moment (a bunch of people are > > much > > > > harder to organize then code), I did some relaxations by converting > > another fine Qt example. As usual, I couldn't resist in pimping it > > up in some minor ways. Most prominently, I added a way to change > > the date format globally. Also, a workaround to fetch the correct > > cell background color is applied. > > I removed the workaround as (for me) it doesn't seem to be needed and > also it breaks the background of the first and last rows. Not here. Does the background color dialog show the correct color for you in all fields? Here, it's showing black by default, while I use some very different background color. > > One thing escaped me, though: the SpreadSheetItem.clone() method. > > It is finalized with an instance pointer assignment in C++. I've > > experimented with the baseclass clone call, which resulted in a > > strange: item = super(SpreadSheetItem, self).clone() > > RuntimeError: underlying C/C++ object has been deleted > > but since this doesn't seem to be intented in the original version, > > feel > > > > free to ignore this. > > I used super().clone() but I'm not sure if the code was ever executed > in my testing. What operation were you doing when it happened? I called it manually to investigate it further, while I noticed, that it never got called in normal operation. > > Anyway, this example shows the powers of Qt in some nice ways. > > Hopefully > > > > you can include it in the upcoming release. Pete ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
Re: [PyQt] spreadsheet example
On Mon, 20 Feb 2012 18:20:32 +0100, "Hans-Peter Jansen" wrote: > Am Sunday 19 February 2012 12:47:28 schrieb Phil Thompson: >> On Sat, 11 Feb 2012 01:36:14 +0100, "Hans-Peter Jansen" >> >> >> wrote: >> > Hi Phil, >> > >> > while I'm seriously overloaded at the moment (a bunch of people are >> > much >> > >> > harder to organize then code), I did some relaxations by converting >> > another fine Qt example. As usual, I couldn't resist in pimping it >> > up in some minor ways. Most prominently, I added a way to change >> > the date format globally. Also, a workaround to fetch the correct >> > cell background color is applied. >> >> I removed the workaround as (for me) it doesn't seem to be needed and >> also it breaks the background of the first and last rows. > > Not here. Does the background color dialog show the correct color for > you in all fields? Here, it's showing black by default, while I use > some very different background color. It shows black for white fields, and the correct colour for others. This is the same as the C++ version - this is on a Mac. I was more concerned about the incorrect first and last rows. Phil ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[PyQt] Mouse Hover Event small issue
hi , I want to do hover i saw an example and then write a script which will be use as i made program i am facing one problem that hover only occur if u putt mouse on the left corner of button i want that it will happen for all the button that if i move cursor on button then it should change. here is my code from PyQt4 import QtGui, QtCore from PyQt4.QtCore import pyqtSignal import os,sys class HoverButton(QtGui.QToolButton): def enterEvent(self,event): print("Enter") button.setStyleSheet("background-color:#45b545;") def leaveEvent(self,event): button.setStyleSheet("background-color:yellow;") print("Leave") app = QtGui.QApplication(sys.argv) widget = QtGui.QWidget() button = QtGui.QToolButton(widget) button.setMouseTracking(True) buttonss = HoverButton(button) button.setIconSize(QtCore.QSize(200,200)) widget.show() sys.exit(app.exec_()) ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[PyQt] How do I change a mixed font format?
Hello. I have a problem about QTextEdit. Setting font functions of QTextEdit do not work as those of word processor. I want to change mixed font formats consistently. For example, selected text is """style="font-style:italic;">Text1Text2.""" I want to apply "underline" to the text, so I can use QTextEdit.setFontUnderline(). And then, the text is """Text1style="text-decoration:underline;">Text2""" However, if I use QTextEdit.setCurrentFont for "strike out", all text is set to font of last cursor as """Text1style="text-decoration:line-through;">Text2""" setFont* functions of QTextEdit work well, but using setCurrentFont for unsupported function does not work as word processor. How can I do that? ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt