src/uiutilities.cpp

changeset 178
a23024fc98e0
parent 24
1a0faaaceb84
child 259
c27612f0eac0
equal deleted inserted replaced
177:f69d53c053df 178:a23024fc98e0
14 * 14 *
15 * You should have received a copy of the GNU General Public License 15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>. 16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */ 17 */
18 18
19 #include <QStyleFactory>
19 #include "uiutilities.h" 20 #include "uiutilities.h"
20 21
21 QVector<QAction*> uiutilities::collectActions(QObject* subject) 22 QVector<QAction*> uiutilities::collectActions(QObject* subject)
22 { 23 {
23 QVector<QAction*> actions; 24 QVector<QAction*> actions;
40 { 41 {
41 result[action->objectName()] = action->shortcut(); 42 result[action->objectName()] = action->shortcut();
42 } 43 }
43 return result; 44 return result;
44 } 45 }
46
47 void uiutilities::colorizeWidget(QWidget* widget, const QColor& color)
48 {
49 QPalette pal{color};
50 widget->setPalette(pal);
51 widget->setAutoFillBackground(true);
52 widget->setStyle(QStyleFactory::create("Fusion"));
53 widget->update();
54 }

mercurial