Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / qt / 2011-04

QPixmap::handle(): Pixmap is not an X11 class pixmap

6 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Juha gmail

I am getting the output (in subject) from Lazarus compiled with QT bindings. Is it something to worry about?

Juha

Juha gmail
to zeljko

zeljko kirjoitti keskiviikko, 13. huhtikuuta 2011 15:38:11:

Show quoted text 6 lines
On Wednesday 13 of April 2011 10:17:30 Juha (gmail) wrote: > I am getting the output (in subject) from Lazarus compiled with QT > bindings. Is it something to worry about? Yes. Something is wrong with Qt libs. Or you provided wrong QPixmap to Qt or similar.

I am still getting it all the time from Lazarus itself when I open a menu item or dialog.

Juha

zeljko
to Juha gmail
Juha wrote 10 lines
zeljko kirjoitti keskiviikko, 13. huhtikuuta 2011 15:38:11: > On Wednesday 13 of April 2011 10:17:30 Juha (gmail) wrote: > > I am getting the output (in subject) from Lazarus compiled with QT > > bindings. Is it something to worry about? > > Yes. Something is wrong with Qt libs. Or you provided wrong QPixmap to Qt > or similar. I am still getting it all the time from Lazarus itself when I open a menu item or dialog.

Never seen such msg, Fedora 14 32bit + all updates.

zeljko

zeljko
to Juha gmail: zeljko kirjoitti keskiviikko, 13. huhtikuuta 2011 15:38:11: I am still getting it all the…
Juha wrote 10 lines
zeljko kirjoitti keskiviikko, 13. huhtikuuta 2011 15:38:11: > On Wednesday 13 of April 2011 10:17:30 Juha (gmail) wrote: > > I am getting the output (in subject) from Lazarus compiled with QT > > bindings. Is it something to worry about? > > Yes. Something is wrong with Qt libs. Or you provided wrong QPixmap to Qt > or similar. I am still getting it all the time from Lazarus itself when I open a menu item or dialog.

Look at qt implemenation below. That comes from function which isn't called from qtlcl, but from qt.It's just warning that passed data isn't valid X11 object. I cannot get such warning.You said that it happens when you open an menu or dialog, so it's easy to see if it's qtlcl or qt problem.There's only one function inside qtlcl which draws image (qtobjects -> TQtDeviceContext.drawImage). Put there an writeln and see if warning comes after that function is called.

/*!
Returns the pixmap's handle to the device context.

Note that, since QPixmap make use of \l {Implicit Data Sharing}{implicit data sharing}, the detach() function must be called explicitly to ensure that only \e this pixmap's data is modified if the pixmap data is shared.

\warning This function is X11 specific; using it is non-portable.

\sa detach()
*/

Qt::HANDLE QPixmap::handle() const
{
#if defined(Q_WS_X11)

    const QPixmapData *pd = pixmapData();
    if (pd) {
        if (pd->classId() == QPixmapData::X11Class)
            return static_cast<const QX11PixmapData*>(pd)->handle();
        else
            qWarning("QPixmap::handle(): Pixmap is not an X11 class pixmap");
    }

#endif

    return 0;

}

Juha gmail
to zeljko

zeljko kirjoitti perjantai, 22. huhtikuuta 2011 09:03:38:

Show quoted text 10 lines
> I am still getting it all the time from Lazarus itself when I open a menu > item or dialog. Look at qt implemenation below. That comes from function which isn't called from qtlcl, but from qt.It's just warning that passed data isn't valid X11 object. I cannot get such warning.You said that it happens when you open an menu or dialog, so it's easy to see if it's qtlcl or qt problem.There's only one function inside qtlcl which draws image (qtobjects -> TQtDeviceContext.drawImage). Put there an writeln and see if warning comes after that function is called.

A strange thing happened (again). I placed a DebugLn there and didn't see the error any more. Then I removed the DebugLn and still I don't see the error. It will possibly remain a mystery.

Juha