Hi
I'm trying to internationalize my PyQt application. Following the pyqt
reference guide i'm trying to use QCoreApplication.translate() instead
of self.tr().
Works but only if i write the full function. But if i want to shorten
it in this way:
tr = QCoreApplication.translate
and then using
Il 2013-01-28 15:11 Hans-Peter Jansen ha scritto:
try this:
print("Load", pix.loadFromData(QByteArray(ba), "PNG"))
I've tryed already this but with no success. >ba< is already a
QByteArray BUT different from what i've store and i don't know why.
As i've replyed before i can on
I changed my code in this way, converting bytea field to a text field:
def createEditor(self, parent, option, index):
dd = DisplayDialog(parent)
ba = index.model().data(index, Qt.DisplayRole)
if ba:
pix=QPixmap()
print("Load", pix.loadFromData(QByte
Hello
I'm trying to create a item delegate for a sql table (postgres db)
where i have a field (type bytea) that should contain a PNG image.
This is the code of the create editor method:
def createEditor(self, parent, option, index):
dd = DisplayDialog(parent)
ba = index.model().
So for best performance at runtime it's prefereble to choose the first
option
Thank you
On Wed, 29 Feb 2012 00:44:32 +0800, Goldfish Huang
wrote:
> The second depends on Qt,QtXml and PyQt4.uic. They cause inconvenience
> when you distributing your PyQt program. And, the program has to spend
> ex
I found in the mailing list archive this old post. As i have the same
problem is there anything new about this ?
I want to use a short form for QCoreApplication.translate("MyContext", "My
String") but if i set:
tr = QCoreApplication.translate(context, string)
and use tr("MyContext", "My String"
Hello
I'm trying to understand how to manage ui files from qtdesigner in the
best way. I see in the examples that i have 2 options:
- use pyuic4.bat utility to translate ui file in a python class (included
in a module) that create the graphical interface through the setupUi()
method
- load the ui f
t; {0}".format(db.lastError().text()))
>> query = QSqlQuery()
>> query.exec_("select * from test_table;")
>> while query.next():
>> print(query.value(0), query.value(1) )
>>
>> This code return the error "Driver not loaded&quo
ry.value(0), query.value(1) )
This code return the error "Driver not loaded". If i change only the
database driver, this line:
db = QSqlDatabase.addDatabase("QODBC")
I get the correct output:
1 Prova paolo
2 Prova Pippo Baudo
So what's wrong ?
I've cheked qsqlps
invalid result type from StaffModel.flags()
TypeError: invalid result type from StaffModel.flags()
(...)
If i delete the flags() method, so that StaffModel is the same of
QSqlTableModel but with 'preloaded' the table name, everything works as
expected.
Looks Like i can not
Hi! :)
I'm a newbie. I've searched in the docs, but I haven't found the solution.
I want to add tooltips to menu, but it doesn't work: tooltips are not
displayed. Suggestions?
my system: ubuntu linux 8.10 with kde 4..2 repository.
Many thanks. This is the code:
#!/usr/bin/env python
# -*- c
simone wrote:
> Paolo Franzetti ha scritto:
>
>> How can I do this job without blocking the main window ?
>
> You don't have to set up another instance of QApplication in the viewer.
>
> But: this application starts in some way? On Windows, with Python 2.5.2
>
12 matches
Mail list logo