问题标签 [qtoolbar]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
c++ - 如何更改工具栏中的 QAction 的颜色?
我有一个工具栏或有几个 QAction。我想在选择 QAction 时更改它的颜色,以便用户可以看到选择的操作。
问题是 QAction 不是 QWidget 所以我们不能使用样式表。有没有办法解决这个问题?或者在我的工具栏中声明 QPushButton 而不是 QAction 会更好吗?
例如,我希望如果我点击一个 QAction,它会被推送到其他人身上。我在我的工具栏中声明了 6 个 QAction。
qt - 如何在 Qt 中将中心对齐的 QLabel 设置为工具栏
我是 qt 的新手并正在探索它。我希望在主窗口的工具栏中有一个居中对齐的文本。下面是我在 MainWindow 构造函数中的代码:
上面的代码显示文本,但不在中心。它显示在左侧。我错过了什么?任何帮助都会非常有帮助。
python - PyQt 工具栏触发
我无法理解这个
tb.actionTriggered[QAction].connect(self.toolbtnpressed)
在这里 actionTriggered[QAction] <- 这是什么?这是一个清单?
python - 将 QToolBar 放入 QWidget 而不是 QMainWindow
我试图将 QToolBar 放在 QWidget 而不是 QMainWindow 的布局上。在 QMainWindow 和 QWidget 上工作正常,但是当我尝试首先将它添加到布局时,不是。难道我做错了什么?可能吗?这是我的代码:
python - 通过按下具有不同输入值的按钮动态调用函数
我有一个带有工具栏的主窗口。我还有一个处理动作的类和一个包含所有动作的类。这是我的代码:
如您所见,问题是无论我在工具栏上按什么按钮,总是执行 ActionClass 中的最后一个方法。看起来lambda
效果并不好。
有什么解决办法吗?
c++ - Qt QToolBar 获取 addAction 添加的按钮
在 Qt 中,当我们使用addAction
a 的函数时QToolBar
:
我们如何检索为该QToolButton
操作生成的内容?
或者,如果这是不可能的,如何找到 a 的最后一个按钮/小部件QToolBar
?
c++ - 选中/取消选中时如何更改 QToolBar 上的 QAction 图标?
我创建了一个QToolBar
:
然后我在样式表中检查时尝试设置图标:
但它不起作用。
那么当工具按钮被选中时,我应该怎么做才能改变图标呢?
qt - Can a QToolbar be added to a QDockWidget?
I have setup my app to have various dock windows within the main window. I am also able to add a toolbar to the main window. However, I would ideally like to add the QToolBar inside one of the QDockWindow instances (or the QWidget that it houses) as the toolbar will be specific to that window.
Is this possible? I'm using a recent version of Qt, 5.10.
python - 使用 QToolBar 和 QListView 进行面包屑导航
我有类似这样的 JSON 数据
现在我想QListView
使用作为面包屑导航(QAction)来QAbstractListModel
填充这些数据。将随着用户触发键而更新。那么我该如何实现呢?QToolBar
QListView