<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>tukunen13</author_name>
  <author_url>https://blog.hatena.ne.jp/tukunen13/</author_url>
  <blog_title>つくねの手帳</blog_title>
  <blog_url>https://tukunen13.hatenablog.jp/</blog_url>
  <categories>
    <anon>Qt</anon>
    <anon>C++</anon>
  </categories>
  <description>今日は、先日少しはまったQWidgetを基底クラスとしたクラスへのスタイルシート設定について。QWidgetクラスは背景色のスタイル設定がサポートされています。 しかし、QLabelなどのように、そのままsetStyleSheet()を呼んでも反映されません。 以下のように、Q_OBJECTの指定と、paintEventを処理する必要があります。 // MyWidget.h #include &lt;QWidget&gt; class MyWidget : public QWidget { Q_OBJECT public: MyWidget(); ~MyWidget(); void paintEvent(…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Ftukunen13.hatenablog.jp%2Fentry%2F2016%2F12%2F17%2F005216&quot; title=&quot; Qt QWidgetの派生クラスへのスタイルシート設定 - つくねの手帳&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2016-12-17 00:52:16</published>
  <title> Qt QWidgetの派生クラスへのスタイルシート設定</title>
  <type>rich</type>
  <url>https://tukunen13.hatenablog.jp/entry/2016/12/17/005216</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
