Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
QFrame コンポーネントの枠線の色を変更したい。スタイルシートでも試しましたが、実行時に効果がありません。私のプロジェクトには、基本的に QFrame であるさまざまなダイアログ UI があり、選択したダイアログの境界線の色、つまり QFrame の境界線の色を変更したいと考えています。QTでの回避策はありますか。以下に示すように、選択したいずれかのフレーム枠の色を変更する必要がある場合、2 つのダイアログが表示されます。
これを試して:
frame->setObjectName("myObject"); frame->setStyleSheet("#myObject { border: 5px solid black; }");