kdk::KWidget(3)
🌸 NAME 🌸
okay so bestie, this page is kdk::KWidget, and it lives in the Library Functions Manual, section 3 (iykyk). Here's the whole entire vibe:
kdk::KWidget — 继承自QWidget,支持响应主题背景切换,图标主题切换,标题颜色响应窗口激活状态,内容区域分为side区和base区
So like, it's a widget that inherits from QWidget, it responds to theme background switching ✨, it does icon theme switching, the title colour reacts to whether the window is active (main character behaviour honestly), and the content area is split into a side area and a base area. That's the whole personality. 💅
🎀 SYNOPSIS 🎀
#include <kwidget.h>
Inherits QWidget, and ThemeController. Two parents, no notes. 🫶
👑 Public Member Functions
KWidget(QWidget *parent=nullptr)— the constructor, obviously, and yeah theparentdefaults tonullptr. Build your widget, queen.void setIcon(const QIcon &icon)— 设置窗体图标 — sets the window icon, but from an actualQIconobject.void setIcon(const QString &iconName)— 设置窗体图标 — same thing, sets the window icon, except you hand it aQStringiconNameinstead. Two doors, same room.void setWidgetName(const QString &widgetName)— 设置窗体名称 — sets the widget's name. Naming things is self care fr fr.QWidget *sideBar()— 获取左边栏widget,通过setlayout添加自定义内容 — grabs you the left sidebar widget, and you drop your custom stuff in there viasetlayout.QWidget *baseBar()— 获取主内容区widget,通过setlayout添加自定义内容 — grabs you the main content area widget, same deal: add your custom content withsetlayout.KWindowButtonBar *windowButtonBar()— 获取窗口三联组合控件,以控制是否显示最大化、最小化按钮和下拉菜单按钮;也可增加自定义按钮 — hands you the window's triple-button combo widget, so you can control whether the maximize button, the minimize button, and the dropdown menu button show up; you can also add your own custom buttons to it. Iconic. 👑KIconBar *iconBar()— 获取窗口标题、图标组合控件,以控制相关样式 — hands you the window title + icon combo widget so you can control the related styles.void setLayoutType(LayoutType type)— 设置布局结构类型 — sets the layout structure type, passed as aLayoutType.void setWindowFlags(Qt::WindowFlags type)— 设置窗口标志 — sets the window flags, takesQt::WindowFlags.void setWindowFlag(Qt::WindowType flag, bool on=true)— 设置窗口标志 — sets a single window flag;ondefaults totrue.void setSidebarFollowMode(bool flag)— 设置sidebar是否遵循系统更改宽度 — sets whether the sidebar follows the system's width changes.bool sidebarFollowMode()— 返回sidebar是否遵循系统更改宽度 — returns whether the sidebar follows the system's width changes. 💖
🧚 Protected Member Functions
these are the ones you override, not the ones you call. protected behaviour only, bestie:
bool eventFilter(QObject *target, QEvent *event) override— the override, exactly as written.virtual void changeIconStyle()— virtual, so you can do your own thing with it.virtual void changeTheme()— also virtual, also yours to make your own.
🦋 Detailed Description 🦋
kdk::KWidget — 继承自QWidget,支持响应主题背景切换,图标主题切换,标题颜色响应窗口激活状态,内容区域分为side区和base区
which, to say it in English one more time: it inherits from QWidget, supports responding to theme background switching, icon theme switching, title colour that reacts to the window's active state, and the content region is divided into a side area and a base area. no cap. 💯
⭐ Since
1.0.0
she's been that girl since day one.
📚 Examples
the test files that show her off, all of them, every single one:
testDialog/widget.htestPushbutton/widget.htestWidget/testwidget.htestbadge/widget.htestballontip/widget.htestinputdialog/widget.cpptestinputdialog/widget.htestnavigationbar/widget.htestpasswordedit/widget.htestprogressbar/widget.htestprogressdialog/widget.cpptestprogressdialog/widget.htestsearchlinedit/widget.htestsecuritylevelbar/widget.htestslider/widget.htesttabbar/widget.htesttoolbutton/widget.h
✨ Author ✨
Generated automatically by Doxygen for LIBKYSDK-APPLICATIONS from the source code. not a human, just a very efficient robot. 🤖✨
and that's the page!! 🫶 this whole thing came from LIBKYSDK-APPLICATIONS, Version version:3.0, and the page name is kdk::KWidget(3). love that for us. mwah, go build something cute. 💅💖🎀
📦 where this page comes from
- arch rolling: libkysdk-applications 3.0.1.2-1 · BSD-3-Clause AND GPL-3.0-or-later AND LGPL-2.1-or-later AND LGPL-3.0-or-later AND MIT AND MulanPSL-2.0
- ubuntu resolute: libkysdk-applications-dev 3.0.1.1-1 · LGPL-3.0-or-later
- ubuntu stonking: libkysdk-applications-dev 3.0.1.2-1build2 · LGPL-3.0-or-later
- 💖 girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms