[Qt-interest] Displaying a button in a table cell.

Yuriy Rusinov yrusinov at gmail.com
Fri May 22 18:57:52 CEST 2009


Hello Andrew !

On Fri, May 22, 2009 at 4:16 AM, Andrew Maclean
<andrew.amaclean at gmail.com> wrote:
> I have a QT/Postgres application and I want to display the data from a
> postgres table in a QT table. One column of the posgres table consists
> of binary data so obviously this is not of any great value to display.
>
> Is it possible to mask the cells with buttons that when clicked will
> download the data to a file or upload data to the table if the cell is
> empty?

You need some subclasses of QItemDelegate and QAbstractItemModel.
If you describe your problem in more detail then I can give some more
advices or code examples. Possible you have to set binary data not to
Qt::DisplayRole but on to Qt::UserRole.
>
> Say you have a database of pictures and descriptions, what do people
> normally do in this case?
> In my case it is binary code not images.
>
> Thanks in advance for any help.



-- 
Best regards,
Sincerely yours,
Yuriy Rusinov.



More information about the Qt-interest-old mailing list