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

List:       kde-devel
Subject:    Re: Problem with QGraphicsLinearLayout
From:       Christophe Olinger <olingerc () binarylooks ! com>
Date:       2010-04-15 17:12:31
Message-ID: u2k1718db771004151012l5c24c327j4ec1fe0710a478f () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Thanks Shaan:

Program received signal SIGSEGV, Segmentation fault.
0x00b13987 in ?? () from /usr/lib/libQtGui.so.4
(gdb) bt
#0  0x00b13987 in ?? () from /usr/lib/libQtGui.so.4
#1  0x00a4c105 in QPaintEngine::drawImage(QRectF const&, QImage const&,
QRectF const&, QFlags<Qt::ImageConversionFlag>) () from
/usr/lib/libQtGui.so.4
#2  0x00b11b19 in ?? () from /usr/lib/libQtGui.so.4
#3  0x00a63688 in ?? () from /usr/lib/libQtGui.so.4
#4  0x00a66463 in QPainter::drawRects(QRectF const*, int) () from
/usr/lib/libQtGui.so.4
#5  0x00770b25 in ?? () from /usr/lib/libQtSvg.so.4
#6  0x00793c75 in ?? () from /usr/lib/libQtSvg.so.4
#7  0x0079b97b in QSvgTinyDocument::draw(QPainter*, QString const&, QRectF
const&) () from /usr/lib/libQtSvg.so.4
#8  0x0079d2ec in QSvgRenderer::render(QPainter*, QString const&, QRectF
const&) () from /usr/lib/libQtSvg.so.4
#9  0x00653c08 in ?? () from /usr/lib/libplasma.so.3
#10 0x00650729 in Plasma::Svg::paint(QPainter*, QRectF const&, QString
const&) () from /usr/lib/libplasma.so.3
#11 0x0068f1a1 in Plasma::Slider::paint(QPainter*, QStyleOptionGraphicsItem
const*, QWidget*) () from /usr/lib/libplasma.so.3
#12 0x00f83f2c in ?? () from /usr/lib/libQtGui.so.4
#13 0x00f9eb94 in ?? () from /usr/lib/libQtGui.so.4
#14 0x00fa1044 in ?? () from /usr/lib/libQtGui.so.4
#15 0x00fa1cb3 in ?? () from /usr/lib/libQtGui.so.4
#16 0x00fa10d4 in ?? () from /usr/lib/libQtGui.so.4
#17 0x00fa1cb3 in ?? () from /usr/lib/libQtGui.so.4
#18 0x00fa10d4 in ?? () from /usr/lib/libQtGui.so.4
#19 0x00fa1cb3 in ?? () from /usr/lib/libQtGui.so.4
#20 0x00fa26be in ?? () from /usr/lib/libQtGui.so.4
#21 0x00fbcbeb in QGraphicsView::paintEvent(QPaintEvent*) () from
/usr/lib/libQtGui.so.4
#22 0x0094c6b6 in QWidget::event(QEvent*) () from /usr/lib/libQtGui.so.4
#23 0x00d48fd3 in QFrame::event(QEvent*) () from /usr/lib/libQtGui.so.4
#24 0x00de3382 in QAbstractScrollArea::viewportEvent(QEvent*) () from
/usr/lib/libQtGui.so.4
#25 0x00fb906b in QGraphicsView::viewportEvent(QEvent*) () from
/usr/lib/libQtGui.so.4
#26 0x00de5c65 in ?? () from /usr/lib/libQtGui.so.4
#27 0x01671cda in
QCoreApplicationPrivate::sendThroughObjectEventFilters(QObject*, QEvent*) ()
from /usr/lib/libQtCore.so.4
#28 0x008ee4b9 in QApplicationPrivate::notify_helper(QObject*, QEvent*) ()
from /usr/lib/libQtGui.so.4
#29 0x008f50f9 in QApplication::notify(QObject*, QEvent*) () from
/usr/lib/libQtGui.so.4
#30 0x0030df2a in KApplication::notify(QObject*, QEvent*) () from
/usr/lib/libkdeui.so.5
#31 0x01672a3b in QCoreApplication::notifyInternal(QObject*, QEvent*) ()
from /usr/lib/libQtCore.so.4
#32 0x009559d6 in QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&,
QPoint const&, int, QPainter*, QWidgetBackingStore*) () from
/usr/lib/libQtGui.so.4
#33 0x00956815 in QWidgetPrivate::paintSiblingsRecursive(QPaintDevice*,
QList<QObject*> const&, int, QRegion const&, QPoint const&, int, QPainter*,
QWidgetBackingStore*) ()
   from /usr/lib/libQtGui.so.4
#34 0x00955725 in QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&,
QPoint const&, int, QPainter*, QWidgetBackingStore*) () from
/usr/lib/libQtGui.so.4
#35 0x00956815 in QWidgetPrivate::paintSiblingsRecursive(QPaintDevice*,
QList<QObject*> const&, int, QRegion const&, QPoint const&, int, QPainter*,
QWidgetBackingStore*) ()
   from /usr/lib/libQtGui.so.4
#36 0x0095664e in QWidgetPrivate::paintSiblingsRecursive(QPaintDevice*,
QList<QObject*> const&, int, QRegion const&, QPoint const&, int, QPainter*,
QWidgetBackingStore*) ()
   from /usr/lib/libQtGui.so.4
#37 0x00955725 in QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&,
QPoint const&, int, QPainter*, QWidgetBackingStore*) () from
/usr/lib/libQtGui.so.4
#38 0x00b2c890 in ?? () from /usr/lib/libQtGui.so.4
#39 0x00b2cd1a in ?? () from /usr/lib/libQtGui.so.4
---Type <return> to continue, or q <return> to quit---
#40 0x00945ae2 in QWidgetPrivate::syncBackingStore(QRegion const&) () from
/usr/lib/libQtGui.so.4
#41 0x009729d8 in ?? () from /usr/lib/libQtGui.so.4
#42 0x0097ee1a in QApplication::x11ProcessEvent(_XEvent*) () from
/usr/lib/libQtGui.so.4
#43 0x009ae60a in ?? () from /usr/lib/libQtGui.so.4
#44 0x0344c5e5 in g_main_context_dispatch () from /lib/libglib-2.0.so.0
#45 0x034502d8 in ?? () from /lib/libglib-2.0.so.0
#46 0x034504b8 in g_main_context_iteration () from /lib/libglib-2.0.so.0
#47 0x0169e5d5 in
QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>)
() from /usr/lib/libQtCore.so.4
#48 0x009ae135 in ?? () from /usr/lib/libQtGui.so.4
#49 0x01671059 in
QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from
/usr/lib/libQtCore.so.4
#50 0x016714aa in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) ()
from /usr/lib/libQtCore.so.4
#51 0x0167569f in QCoreApplication::exec() () from /usr/lib/libQtCore.so.4
#52 0x008ee577 in QApplication::exec() () from /usr/lib/libQtGui.so.4
#53 0x0804c6f8 in main (argc=1, argv=0xbffff3b4) at
/home/binarylooks/Projects/programming_projects/pmc/MediaCenterComponents/shells/plasmediacenter/main.cpp:55



On Thu, Apr 15, 2010 at 6:03 PM, Shantanu Tushar Jha <jhahoneyk@gmail.com>wrote:

> Use "gdb plasmediacenter" on the command line, and then at the (gdb)
> prompt, type "run" to start the application. Then, when it crashes,
> use "bt" to get the backtrace and post it here ..
> 
> On Thu, Apr 15, 2010 at 9:28 PM, Christophe Olinger
> <olingerc@binarylooks.com> wrote:
> > I get this as last output: (the first 2 lines are normal)
> > plasmediacenter(3974) PlaylistDelegate::sizeHint: returning QSize( 166 ,
> 52
> > ) for "DSC01206.JPG"
> > plasmediacenter(3974) PlaylistDelegate::sizeHint: returning QSize( 166 ,
> 52
> > ) for "DSC01063.JPG"
> > X Error: BadAlloc (insufficient resources for operation) 11
> > Major opcode: 53 (X_CreatePixmap)
> > Resource id:  0x15a
> > X Error: BadDrawable (invalid Pixmap or Window parameter) 9
> > Extension:    152 (RENDER)
> > Minor opcode: 4 (RenderCreatePicture)
> > Resource id:  0x2e000b1
> > X Error: BadDrawable (invalid Pixmap or Window parameter) 9
> > Major opcode: 55 (X_CreateGC)
> > Resource id:  0x2e000b1
> > X Error: BadAlloc (insufficient resources for operation) 11
> > Major opcode: 53 (X_CreatePixmap)
> > Resource id:  0x15a
> > X Error: BadDrawable (invalid Pixmap or Window parameter) 9
> > Extension:    152 (RENDER)
> > Minor opcode: 4 (RenderCreatePicture)
> > Resource id:  0x2e000b4
> > X Error: BadDrawable (invalid Pixmap or Window parameter) 9
> > Major opcode: 55 (X_CreateGC)
> > Resource id:  0x2e000b4
> > plasmediacenter(3974)/plasma Image::setSingleImage:
> > "/usr/share/wallpapers/Ethais/contents/images/1920x1200.png"
> > "/usr/share/wallpapers/Ethais"
> > Program received signal SIGSEGV, Segmentation fault.
> > 0x00b13987 in ?? () from /usr/lib/libQtGui.so.4
> > 
> > On Thu, Apr 15, 2010 at 4:39 PM, John Tapsell <johnflux@gmail.com>
> wrote:
> > > 
> > > On 15 April 2010 18:53, Christophe Olinger <olingerc@binarylooks.com>
> > > wrote:
> > > > Hey everybody,
> > > > 
> > > > I have a crash in my application (plasma media center) that I do not
> > > > understand. This is my situation:
> > > > 
> > > > I have a bar which is supposed to show iconwidgets. The class of that
> > > > bar
> > > > has a function which I use to add widgets to my bar. Depending on the
> > > > widget, I want it to be on the left, the middle or the right side of
> my
> > > > bar.
> > > > Later I want to add a bottom part but that's not the problem at the
> > > > moment.
> > > > (The function takes a list of Widgets as paramter)
> > > > 
> > > > The way I understood layouts in Qt I did the following:
> > > > 1) I created a QGraphicsLinearLayout m_layoutHorizontalTop (this is
> the
> > > > container)
> > > > 2) I created additional layouts: m_layoutTopLeft, m_layoutTopMiddle,
> > > > m_layoutTopRight (this will be boxes in the container)
> > > > 3) In the init() of my bar I did:
> > > > m_layoutHorizontalTop->addItem(m_layoutTopLeft) (I only add the first
> > > > box)
> > > > 4) On my bar I do: addLayout->(m_layoutHorizontalTop)
> > > > 5) my function adds items only to the m_layoutTopLeft, (later also to
> > > > the
> > > > other layouts)
> > > > 6) no problem, icons are there
> > > > 
> > > > Now as soon as I add this line in my init (which would add the next
> > > > box):
> > > > m_layoutHorizontalTop->addItem(m_layoutTopMiddle) my application
> crashes
> > > > on
> > > > startup?!
> > > > 
> > > > It is not the fact that I add this layout that makes it crash, but the
> > > > fact
> > > > that my function wants to add widgets to the TopLeft layout. I thought
> > > > these
> > > > layouts would be boxes that I could fill with widgets, but why does
> that
> > > > fact that I put two boxes next to each other interfere with me adding
> > > > widgets in one box?
> > > 
> > > What does gdb tell you about the crash?
> > > 
> > > > > Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to
> > > > > unsubscribe <<
> > 
> > 
> > 
> > > > Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to
> unsubscribe
> > > > <<
> > 
> > 
> 
> 
> 
> --
> Shantanu Tushar    (UTC +0530)
> http://www.shantanutushar.com
> 
> > > Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to
> unsubscribe <<
> 


[Attachment #5 (text/html)]

Thanks Shaan:<div><br></div><div><div>Program received signal SIGSEGV, Segmentation \
fault.</div><div>0x00b13987 in ?? () from /usr/lib/libQtGui.so.4</div><div>(gdb) \
bt</div><div>#0  0x00b13987 in ?? () from /usr/lib/libQtGui.so.4</div> <div>#1  \
0x00a4c105 in QPaintEngine::drawImage(QRectF const&amp;, QImage const&amp;, QRectF \
const&amp;, QFlags&lt;Qt::ImageConversionFlag&gt;) () from \
/usr/lib/libQtGui.so.4</div><div>#2  0x00b11b19 in ?? () from \
/usr/lib/libQtGui.so.4</div> <div>#3  0x00a63688 in ?? () from \
/usr/lib/libQtGui.so.4</div><div>#4  0x00a66463 in QPainter::drawRects(QRectF const*, \
int) () from /usr/lib/libQtGui.so.4</div><div>#5  0x00770b25 in ?? () from \
/usr/lib/libQtSvg.so.4</div> <div>#6  0x00793c75 in ?? () from \
/usr/lib/libQtSvg.so.4</div><div>#7  0x0079b97b in QSvgTinyDocument::draw(QPainter*, \
QString const&amp;, QRectF const&amp;) () from /usr/lib/libQtSvg.so.4</div><div>#8  \
0x0079d2ec in QSvgRenderer::render(QPainter*, QString const&amp;, QRectF const&amp;) \
() from /usr/lib/libQtSvg.so.4</div> <div>#9  0x00653c08 in ?? () from \
/usr/lib/libplasma.so.3</div><div>#10 0x00650729 in Plasma::Svg::paint(QPainter*, \
QRectF const&amp;, QString const&amp;) () from /usr/lib/libplasma.so.3</div><div>#11 \
0x0068f1a1 in Plasma::Slider::paint(QPainter*, QStyleOptionGraphicsItem const*, \
QWidget*) () from /usr/lib/libplasma.so.3</div> <div>#12 0x00f83f2c in ?? () from \
/usr/lib/libQtGui.so.4</div><div>#13 0x00f9eb94 in ?? () from \
/usr/lib/libQtGui.so.4</div><div>#14 0x00fa1044 in ?? () from \
/usr/lib/libQtGui.so.4</div><div>#15 0x00fa1cb3 in ?? () from \
/usr/lib/libQtGui.so.4</div> <div>#16 0x00fa10d4 in ?? () from \
/usr/lib/libQtGui.so.4</div><div>#17 0x00fa1cb3 in ?? () from \
/usr/lib/libQtGui.so.4</div><div>#18 0x00fa10d4 in ?? () from \
/usr/lib/libQtGui.so.4</div><div>#19 0x00fa1cb3 in ?? () from \
/usr/lib/libQtGui.so.4</div> <div>#20 0x00fa26be in ?? () from \
/usr/lib/libQtGui.so.4</div><div>#21 0x00fbcbeb in \
QGraphicsView::paintEvent(QPaintEvent*) () from /usr/lib/libQtGui.so.4</div><div>#22 \
0x0094c6b6 in QWidget::event(QEvent*) () from /usr/lib/libQtGui.so.4</div> <div>#23 \
0x00d48fd3 in QFrame::event(QEvent*) () from /usr/lib/libQtGui.so.4</div><div>#24 \
0x00de3382 in QAbstractScrollArea::viewportEvent(QEvent*) () from \
/usr/lib/libQtGui.so.4</div><div>#25 0x00fb906b in \
QGraphicsView::viewportEvent(QEvent*) () from /usr/lib/libQtGui.so.4</div> <div>#26 \
0x00de5c65 in ?? () from /usr/lib/libQtGui.so.4</div><div>#27 0x01671cda in \
QCoreApplicationPrivate::sendThroughObjectEventFilters(QObject*, QEvent*) () from \
/usr/lib/libQtCore.so.4</div><div>#28 0x008ee4b9 in \
QApplicationPrivate::notify_helper(QObject*, QEvent*) () from \
/usr/lib/libQtGui.so.4</div> <div>#29 0x008f50f9 in QApplication::notify(QObject*, \
QEvent*) () from /usr/lib/libQtGui.so.4</div><div>#30 0x0030df2a in \
KApplication::notify(QObject*, QEvent*) () from /usr/lib/libkdeui.so.5</div><div>#31 \
0x01672a3b in QCoreApplication::notifyInternal(QObject*, QEvent*) () from \
/usr/lib/libQtCore.so.4</div> <div>#32 0x009559d6 in \
QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&amp;, QPoint const&amp;, int, \
QPainter*, QWidgetBackingStore*) () from /usr/lib/libQtGui.so.4</div><div>#33 \
0x00956815 in QWidgetPrivate::paintSiblingsRecursive(QPaintDevice*, \
QList&lt;QObject*&gt; const&amp;, int, QRegion const&amp;, QPoint const&amp;, int, \
QPainter*, QWidgetBackingStore*) ()</div> <div>   from \
/usr/lib/libQtGui.so.4</div><div>#34 0x00955725 in \
QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&amp;, QPoint const&amp;, int, \
QPainter*, QWidgetBackingStore*) () from /usr/lib/libQtGui.so.4</div><div> #35 \
0x00956815 in QWidgetPrivate::paintSiblingsRecursive(QPaintDevice*, \
QList&lt;QObject*&gt; const&amp;, int, QRegion const&amp;, QPoint const&amp;, int, \
QPainter*, QWidgetBackingStore*) ()</div><div>   from /usr/lib/libQtGui.so.4</div> \
<div>#36 0x0095664e in QWidgetPrivate::paintSiblingsRecursive(QPaintDevice*, \
QList&lt;QObject*&gt; const&amp;, int, QRegion const&amp;, QPoint const&amp;, int, \
QPainter*, QWidgetBackingStore*) ()</div><div>   from /usr/lib/libQtGui.so.4</div> \
<div>#37 0x00955725 in QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&amp;, \
QPoint const&amp;, int, QPainter*, QWidgetBackingStore*) () from \
/usr/lib/libQtGui.so.4</div><div>#38 0x00b2c890 in ?? () from \
/usr/lib/libQtGui.so.4</div> <div>#39 0x00b2cd1a in ?? () from \
/usr/lib/libQtGui.so.4</div><div>---Type &lt;return&gt; to continue, or q \
&lt;return&gt; to quit---</div><div>#40 0x00945ae2 in \
QWidgetPrivate::syncBackingStore(QRegion const&amp;) () from \
/usr/lib/libQtGui.so.4</div> <div>#41 0x009729d8 in ?? () from \
/usr/lib/libQtGui.so.4</div><div>#42 0x0097ee1a in \
QApplication::x11ProcessEvent(_XEvent*) () from /usr/lib/libQtGui.so.4</div><div>#43 \
0x009ae60a in ?? () from /usr/lib/libQtGui.so.4</div> <div>#44 0x0344c5e5 in \
g_main_context_dispatch () from /lib/libglib-2.0.so.0</div><div>#45 0x034502d8 in ?? \
() from /lib/libglib-2.0.so.0</div><div>#46 0x034504b8 in g_main_context_iteration () \
from /lib/libglib-2.0.so.0</div> <div>#47 0x0169e5d5 in \
QEventDispatcherGlib::processEvents(QFlags&lt;QEventLoop::ProcessEventsFlag&gt;) () \
from /usr/lib/libQtCore.so.4</div><div>#48 0x009ae135 in ?? () from \
/usr/lib/libQtGui.so.4</div><div>#49 0x01671059 in \
QEventLoop::processEvents(QFlags&lt;QEventLoop::ProcessEventsFlag&gt;) () from \
/usr/lib/libQtCore.so.4</div> <div>#50 0x016714aa in \
QEventLoop::exec(QFlags&lt;QEventLoop::ProcessEventsFlag&gt;) () from \
/usr/lib/libQtCore.so.4</div><div>#51 0x0167569f in QCoreApplication::exec() () from \
/usr/lib/libQtCore.so.4</div><div>#52 0x008ee577 in QApplication::exec() () from \
/usr/lib/libQtGui.so.4</div> <div>#53 0x0804c6f8 in main (argc=1, argv=0xbffff3b4) at \
/home/binarylooks/Projects/programming_projects/pmc/MediaCenterComponents/shells/plasmediacenter/main.cpp:55</div><div><br></div><br><div \
class="gmail_quote">On Thu, Apr 15, 2010 at 6:03 PM, Shantanu Tushar Jha <span \
dir="ltr">&lt;<a href="mailto:jhahoneyk@gmail.com">jhahoneyk@gmail.com</a>&gt;</span> \
wrote:<br> <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px \
#ccc solid;padding-left:1ex;">Use &quot;gdb plasmediacenter&quot; on the command \
line, and then at the (gdb)<br> prompt, type &quot;run&quot; to start the \
application. Then, when it crashes,<br> use &quot;bt&quot; to get the backtrace and \
post it here ..<br> <br>
On Thu, Apr 15, 2010 at 9:28 PM, Christophe Olinger<br>
<div><div></div><div class="h5">&lt;<a \
href="mailto:olingerc@binarylooks.com">olingerc@binarylooks.com</a>&gt; wrote:<br> \
&gt; I get this as last output: (the first 2 lines are normal)<br> &gt; \
plasmediacenter(3974) PlaylistDelegate::sizeHint: returning QSize( 166 , 52<br> &gt; \
) for &quot;DSC01206.JPG&quot;<br> &gt; plasmediacenter(3974) \
PlaylistDelegate::sizeHint: returning QSize( 166 , 52<br> &gt; ) for \
&quot;DSC01063.JPG&quot;<br> &gt; X Error: BadAlloc (insufficient resources for \
operation) 11<br> &gt;   Major opcode: 53 (X_CreatePixmap)<br>
&gt;   Resource id:  0x15a<br>
&gt; X Error: BadDrawable (invalid Pixmap or Window parameter) 9<br>
&gt;   Extension:    152 (RENDER)<br>
&gt;   Minor opcode: 4 (RenderCreatePicture)<br>
&gt;   Resource id:  0x2e000b1<br>
&gt; X Error: BadDrawable (invalid Pixmap or Window parameter) 9<br>
&gt;   Major opcode: 55 (X_CreateGC)<br>
&gt;   Resource id:  0x2e000b1<br>
&gt; X Error: BadAlloc (insufficient resources for operation) 11<br>
&gt;   Major opcode: 53 (X_CreatePixmap)<br>
&gt;   Resource id:  0x15a<br>
&gt; X Error: BadDrawable (invalid Pixmap or Window parameter) 9<br>
&gt;   Extension:    152 (RENDER)<br>
&gt;   Minor opcode: 4 (RenderCreatePicture)<br>
&gt;   Resource id:  0x2e000b4<br>
&gt; X Error: BadDrawable (invalid Pixmap or Window parameter) 9<br>
&gt;   Major opcode: 55 (X_CreateGC)<br>
&gt;   Resource id:  0x2e000b4<br>
&gt; plasmediacenter(3974)/plasma Image::setSingleImage:<br>
&gt; &quot;/usr/share/wallpapers/Ethais/contents/images/1920x1200.png&quot;<br>
&gt; &quot;/usr/share/wallpapers/Ethais&quot;<br>
&gt; Program received signal SIGSEGV, Segmentation fault.<br>
&gt; 0x00b13987 in ?? () from /usr/lib/libQtGui.so.4<br>
&gt;<br>
&gt; On Thu, Apr 15, 2010 at 4:39 PM, John Tapsell &lt;<a \
href="mailto:johnflux@gmail.com">johnflux@gmail.com</a>&gt; wrote:<br> &gt;&gt;<br>
&gt;&gt; On 15 April 2010 18:53, Christophe Olinger &lt;<a \
href="mailto:olingerc@binarylooks.com">olingerc@binarylooks.com</a>&gt;<br> &gt;&gt; \
wrote:<br> &gt;&gt; &gt; Hey everybody,<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; I have a crash in my application (plasma media center) that I do \
not<br> &gt;&gt; &gt; understand. This is my situation:<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; I have a bar which is supposed to show iconwidgets. The class of \
that<br> &gt;&gt; &gt; bar<br>
&gt;&gt; &gt; has a function which I use to add widgets to my bar. Depending on \
the<br> &gt;&gt; &gt; widget, I want it to be on the left, the middle or the right \
side of my<br> &gt;&gt; &gt; bar.<br>
&gt;&gt; &gt; Later I want to add a bottom part but that&#39;s not the problem at \
the<br> &gt;&gt; &gt; moment.<br>
&gt;&gt; &gt; (The function takes a list of Widgets as paramter)<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; The way I understood layouts in Qt I did the following:<br>
&gt;&gt; &gt; 1) I created a QGraphicsLinearLayout m_layoutHorizontalTop (this is \
the<br> &gt;&gt; &gt; container)<br>
&gt;&gt; &gt; 2) I created additional layouts: m_layoutTopLeft, \
m_layoutTopMiddle,<br> &gt;&gt; &gt; m_layoutTopRight (this will be boxes in the \
container)<br> &gt;&gt; &gt; 3) In the init() of my bar I did:<br>
&gt;&gt; &gt; m_layoutHorizontalTop-&gt;addItem(m_layoutTopLeft) (I only add the \
first<br> &gt;&gt; &gt; box)<br>
&gt;&gt; &gt; 4) On my bar I do: addLayout-&gt;(m_layoutHorizontalTop)<br>
&gt;&gt; &gt; 5) my function adds items only to the m_layoutTopLeft, (later also \
to<br> &gt;&gt; &gt; the<br>
&gt;&gt; &gt; other layouts)<br>
&gt;&gt; &gt; 6) no problem, icons are there<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; Now as soon as I add this line in my init (which would add the next<br>
&gt;&gt; &gt; box):<br>
&gt;&gt; &gt; m_layoutHorizontalTop-&gt;addItem(m_layoutTopMiddle) my application \
crashes<br> &gt;&gt; &gt; on<br>
&gt;&gt; &gt; startup?!<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; It is not the fact that I add this layout that makes it crash, but \
the<br> &gt;&gt; &gt; fact<br>
&gt;&gt; &gt; that my function wants to add widgets to the TopLeft layout. I \
thought<br> &gt;&gt; &gt; these<br>
&gt;&gt; &gt; layouts would be boxes that I could fill with widgets, but why does \
that<br> &gt;&gt; &gt; fact that I put two boxes next to each other interfere with me \
adding<br> &gt;&gt; &gt; widgets in one box?<br>
&gt;&gt;<br>
&gt;&gt; What does gdb tell you about the crash?<br>
&gt;&gt;<br>
&gt;&gt; &gt;&gt; Visit <a \
href="http://mail.kde.org/mailman/listinfo/kde-devel#unsub" \
target="_blank">http://mail.kde.org/mailman/listinfo/kde-devel#unsub</a> to<br> \
&gt;&gt; &gt;&gt; unsubscribe &lt;&lt;<br> &gt;<br>
&gt;<br>
&gt;<br>
&gt;&gt;&gt; Visit <a href="http://mail.kde.org/mailman/listinfo/kde-devel#unsub" \
target="_blank">http://mail.kde.org/mailman/listinfo/kde-devel#unsub</a> to \
unsubscribe<br> &gt;&gt;&gt; &lt;&lt;<br>
&gt;<br>
&gt;<br>
<br>
<br>
<br>
</div></div><font color="#888888">--<br>
Shantanu Tushar    (UTC +0530)<br>
<a href="http://www.shantanutushar.com" \
target="_blank">http://www.shantanutushar.com</a><br> </font><div><div></div><div \
class="h5"><br> &gt;&gt; Visit <a \
href="http://mail.kde.org/mailman/listinfo/kde-devel#unsub" \
target="_blank">http://mail.kde.org/mailman/listinfo/kde-devel#unsub</a> to \
unsubscribe &lt;&lt;<br> </div></div></blockquote></div><br></div>



>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<


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

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