[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-panel-devel
Subject:    Re: Segmentation fault when running NETRootInfo
From:       vatbier <vatbier () yahoo ! com>
Date:       2008-10-31 22:56:03
Message-ID: 312412.93505.qm () web50302 ! mail ! re2 ! yahoo ! com
[Download RAW message or body]

--- On Thu, 10/30/08, vatbier <vatbier@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:
#include <QApplication>
 ...
 int main(int argc, char *argv[])
 {
     QApplication app(argc, argv);
     NETRootInfo info(QX11Info::display(), 0);
     info.setShowingDesktop(true);

 And it runs now without segfault and it minimizes all windows !!

vatbier


      
_______________________________________________
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic