Segmentation fault when running NETRootInfo info(QX11Info::display(), 0)
vatbier at yahoo.com
Fri Oct 31 23:56:03 CET 2008
--- On Thu, 10/30/08, vatbier <vatbier at yahoo.com> wrote:
Phew, I've found the solution thanks to anda_skoa from Austria who replied
to me at http://forum.kde.org/showthread.php?tid=10512.
He told me that QX11Info::display() looks like it might need a QApplication instance.
I haven't got any clue (yet) how a Qt program works.
I looked at the main.cpp of a QMake Qt4 project in KDevelop and I added this in myshowdesktop.cpp:
int main(int argc, char *argv)
QApplication app(argc, argv);
NETRootInfo info(QX11Info::display(), 0);
And it runs now without segfault and it minimizes all windows !!
More information about the Plasma-devel