<?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[Doing a mockup of a physical panel]]></title><description><![CDATA[<p dir="auto">I'm in a new project that hasn't gotten so far that there's any kind of hardware done yet, but to get a feel of the UX I'm trying to do a mockup of the control panel. The controls will be physical buttons around a display (without touch) that reports back the system status, and I've built my UI on the image of the panel from the UX-designer and made certain areas clickable and so on. Works like a charm.</p>
<p dir="auto">What DOESN'T work like a charm is the display. Right now I'm simply drawing icons etc over the scanned image and while this works it means that I can't really simulate the final result but has to cludge around to get things drawn with an offset. What I would like to have would be a QWidget or similar that simply "floated" on top of the picture of the physical panel with the correct offset, something like this:</p>
<p dir="auto"><img src="https://ddgobkiprc33d.cloudfront.net/c866cc26-46bf-4545-998e-dbab170d716a.png" alt="0_1551192875070_6e15b187-dd67-4ab4-89b4-651b59df9f1f-image.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">This so I can develop code that is as close as possible to the end result while the HW-guys are creating the actual hardware.</p>
<p dir="auto">Best would be if QWidget was transparent, but I'll settle with a square box on top of the panel too. After all it's just a mockup and we'll just have to live with the rounded corners not being rounded.</p>
<p dir="auto">Is this possible to do? How?</p>
]]></description><link>https://forum.qt.io/topic/100148/doing-a-mockup-of-a-physical-panel</link><generator>RSS for Node</generator><lastBuildDate>Wed, 15 Apr 2026 15:32:50 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/100148.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 26 Feb 2019 15:05:10 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Doing a mockup of a physical panel on Wed, 27 Feb 2019 08:58:55 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/mrjj">@<bdi>mrjj</bdi></a> Doh. Sometimes things are easier than you think and you're just thick! Thank you, worked like a charm.</p>
<p dir="auto">Code included in case someone else has the same problem in the future and is searching for an answer (replace QTextEdit with the widget of your preference):</p>
<pre><code>class TestWindow : public QMainWindow
{
  public:
    TestWindow(QWidget *parent = nullptr) : QMainWindow(parent)
    {
        display = new QTextEdit(this);
        display-&gt;setText("Testing");
        display-&gt;resize(800, 480);
        display-&gt;move(955, 97);
    }

    virtual void paintEvent(QPaintEvent *)
    {
        QPainter painter(this);
        painter.drawImage(0, 0, QImage(":/mockup/panels/Panel.png"));
    }

  private:
    QTextEdit *display;
};

int main(int argc, char *argv[])
{
    QApplication app(argc, argv);

    TestWindow testWindow;
    testWindow.show();

    return app.exec();
}

</code></pre>
]]></description><link>https://forum.qt.io/post/514274</link><guid isPermaLink="true">https://forum.qt.io/post/514274</guid><dc:creator><![CDATA[etla]]></dc:creator><pubDate>Wed, 27 Feb 2019 08:58:55 GMT</pubDate></item><item><title><![CDATA[Reply to Doing a mockup of a physical panel on Tue, 26 Feb 2019 16:13:26 GMT]]></title><description><![CDATA[<p dir="auto">Hi<br />
Do mean if its possible to overlay widgets over some image ?<br />
Like<br />
<img src="http://imagizer.imageshack.com/img922/1601/r6wELi.png" alt="alt text" class=" img-fluid img-markdown" /></p>
<p dir="auto">If yes, you can just display the image in a QLabel and then place a widget over that.</p>
]]></description><link>https://forum.qt.io/post/514125</link><guid isPermaLink="true">https://forum.qt.io/post/514125</guid><dc:creator><![CDATA[mrjj]]></dc:creator><pubDate>Tue, 26 Feb 2019 16:13:26 GMT</pubDate></item></channel></rss>