Forum > QT

Form Style with Qt5

(1/1)

pmesquita:
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  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---QWidget {  background-color: white;  color: black;  selection-background-color: rgb(66, 170, 255);  selection-color: #ffffff;}

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  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---QWidget[WindowType="Desktop"] { color: red }
https://doc.qt.io/qt-5/qt.html#WindowType-enum

Navigation

[0] Message Index

Go to full version