c++ - add a QStandardItem of type PushButton -
i attempting add items qstandarditemmodel of these items of type qstandarditem. wanted know if there way attach qpushbutton model. in other words properties of qstandarditem alter make appear push button
using style sheets best bet. here example styled items in qlistwidget tabs. little massage can give button look.
/* make property editor list tabs */ qlistwidget#propertyeditor_list { background-color: transparent; padding-right: 0px; padding-top: 2px; padding-left: 2px; } qlistwidget#propertyeditor_list::item { padding: 3px; margin-left: 3px; background-color: qlineargradient(x1:0, y1:0, x2:1, y2:0, stop:0 white, stop:1 transparent); border-left: 1px solid rgb(145,155,155); border-top: 1px solid rgb(145,155,155); border-bottom: 1px solid rgb(145,155,155); border-right: 0px; border-top-left-radius: 3px; border-bottom-left-radius: 3px; } qlistwidget#propertyeditor_list::item:hover, qlistwidget#propertyeditor_list::item:selected { background-color: qlineargradient(x1:0, y1:0, x2:1, y2:0, stop:0 rgb(255,200,60), stop:0.039 rgb(255,200,60), stop:0.04 white, stop:0.4 white, stop:1 transparent); border-left-color: rgb(230,139,44); } qlistwidget#propertyeditor_list::item:selected { margin-left: 0px; background-color: qlineargradient(x1:0, y1:0, x2:1, y2:0, stop:0 rgb(255,200,60), stop:0.039 rgb(255,200,60), stop:0.04 white); border-left-color: rgb(230,139,44); color: black; }
Comments
Post a Comment