Recent

Author Topic: Form Style with Qt5  (Read 1607 times)

pmesquita

  • Jr. Member
  • **
  • Posts: 62
Form Style with Qt5
« on: January 17, 2022, 07:27:18 pm »
Good morning guys..

regarding QT5 I was reading the qt documentation and I came across this: QLineEdit[readOnly="true"] { color: gray } where I can access the properties of the widget in question.. so far ok.
But I'm trying to access the WindowType property of the QWidget but without success because I need to define a color and borders for the forms but it applies in the declaration
Code: Pascal  [Select][+][-]
  1. QWidget {
  2.   background-color: white;
  3.   color: black;
  4.   selection-background-color: rgb(66, 170, 255);
  5.   selection-color: #ffffff;
  6. }


is applied to all objects and from what I've seen I can "differentiate" the widgets. Does anyone have any tips..?

What I've found so far to be the solution is:
Code: Pascal  [Select][+][-]
  1. QWidget[WindowType="Desktop"] { color: red }

https://doc.qt.io/qt-5/qt.html#WindowType-enum

 

TinyPortal © 2005-2018