<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[QGraphicsView to cover small bottom region not whole region. Possible?]]></title><description><![CDATA[<p dir="auto">Not all widget( video, tickers) are working on QGraphicsScene &amp; QGraphicsView<br />
Thus, want QGraphicsView to cover only a small bottom label region.<br />
Any comments?<br />
Below is my code.</p>
<p dir="auto">MainWindow::MainWindow(QWidget *parent) :<br />
QMainWindow(parent),<br />
ui(new Ui::MainWindow)<br />
{<br />
ui-&gt;setupUi(this);<br />
QWidget *window= new QWidget;<br />
window-&gt;setWindowTitle("My App");</p>
<pre><code>ml = new WidgetMarqueeLabel(this);
ml-&gt;setTextFormat(Qt::RichText);
ml-&gt;setAlignment(Qt::AlignBottom);
ml-&gt;setText("this is a very long text, todays weathre is very hot");
ml-&gt;setFont(QFont("Arial", 20,20));

//label-&gt;setText("  ");
QGridLayout *layout= new QGridLayout;
video();

layout-&gt;addWidget(videoWidget,0,0);
layout-&gt;addWidget(videoWidget1,0,1);
layout-&gt;addWidget(ml,1,0,1,2);

//create a scene
QGraphicsScene* scene = new QGraphicsScene();
//create an item to put into the scene
QGraphicsRectItem* rect= new QGraphicsRectItem();
rect-&gt;setRect(0,0,100,100);
//add the item to the scene
scene-&gt;addItem(rect);

//add a view-&gt;portion of view is viewable
QGraphicsView* view = new QGraphicsView(scene);
view-&gt;show();
//window-&gt;setLayout(layout);
//window-&gt;show();
</code></pre>
<p dir="auto">}</p>
]]></description><link>https://forum.qt.io/topic/51974/qgraphicsview-to-cover-small-bottom-region-not-whole-region-possible</link><generator>RSS for Node</generator><lastBuildDate>Wed, 05 Aug 2026 12:02:21 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/51974.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 08 Mar 2015 05:40:04 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to QGraphicsView to cover small bottom region not whole region. Possible? on Mon, 09 Mar 2015 10:51:46 GMT]]></title><description><![CDATA[<p dir="auto"><code>layout-&gt;addWidget(view);</code></p>
<p dir="auto">Just make sure to put it in the right place in the grid. Or use a QVBoxLayout instead of the grid.</p>
]]></description><link>https://forum.qt.io/post/264318</link><guid isPermaLink="true">https://forum.qt.io/post/264318</guid><dc:creator><![CDATA[sierdzio]]></dc:creator><pubDate>Mon, 09 Mar 2015 10:51:46 GMT</pubDate></item><item><title><![CDATA[Reply to QGraphicsView to cover small bottom region not whole region. Possible? on Mon, 09 Mar 2015 09:00:02 GMT]]></title><description><![CDATA[<p dir="auto">Know how to create QGraphicsView in mainwindow.<br />
Could you please show QGraphicsView placed at the bottom of UI by code?</p>
]]></description><link>https://forum.qt.io/post/264299</link><guid isPermaLink="true">https://forum.qt.io/post/264299</guid><dc:creator><![CDATA[houmingc]]></dc:creator><pubDate>Mon, 09 Mar 2015 09:00:02 GMT</pubDate></item><item><title><![CDATA[Reply to QGraphicsView to cover small bottom region not whole region. Possible? on Sun, 08 Mar 2015 08:19:15 GMT]]></title><description><![CDATA[<p dir="auto">QGraphicsView is just  a widget, it can be used in layouts and combined with other widgets. So you should be perfectly able to place it only at the bottom of your UI. The problems right now seems to be that you are not placing <em>view</em> object in your layout - so it will not be positioned correctly.</p>
]]></description><link>https://forum.qt.io/post/264148</link><guid isPermaLink="true">https://forum.qt.io/post/264148</guid><dc:creator><![CDATA[sierdzio]]></dc:creator><pubDate>Sun, 08 Mar 2015 08:19:15 GMT</pubDate></item></channel></rss>