QtitanRibbon组件实现了Microsoft Ribbon for Qt的概念,设计用于任何使用Qt开发的商业应用。下文是在实际开发过程中所遇到的一些问题,及解决方法!
QtitanRibbon组件实现了Microsoft Ribbon for Qt的概念,设计用于任何使用Qt开发的商业应用。这个组件和Qt一道为获取一些应用提供了一个难得的机会,这些应用在全球三大主要平台Windows、Linux和Mac OS X上都有现代化的外观和感觉。
下载最新版QtitanRibbon>>
下文是在实际开发过程中所遇到的一些问题,及解决方法!
错误:动画中QList/QTree的鼠标悬停/点击行为不正确。
平台: 使用QTitanRibbon 5.1.0和Qt 5.13.1,64位。
Bug: 当QListView/QTreeView控件中有可检查的项目时,当你将鼠标悬停或点击它们时,你会看到以下情况。
1:没有动画,所有行为都是正确的。
当你启用动画时。
2:在win7/offfice2007/office2010风格下,行为是错误的。
3:但在其他office2013/2016/photoshop中都是正确的。
所以我在controlsdemo的例子中做了一点改动,并用附图验证了这个问题。
这是对ControlsDemo示例的mainwindow.cpp文件的修改:
#include <QTreeView>#include <QStandardItemModel>...MainWindow::MainWindow(QWidget* parent)...emit updateRecentFileActions(files);// Frank start hereQStandardItemModel* pSourceTreeModel = new QStandardItemModel;QStringList szHeaderNameList;szHeaderNameList << "Source/Index" << "Name";pSourceTreeModel->setHorizontalHeaderLabels(szHeaderNameList);QStandardItem* pSourceItem = new QStandardItem("Item1");pSourceItem->setCheckable(true);pSourceItem->setTristate(false);pSourceTreeModel->appendRow(pSourceItem);pSourceItem = new QStandardItem("Item2");pSourceItem->setCheckable(true);pSourceItem->setTristate(false);pSourceTreeModel->appendRow(pSourceItem);pSourceItem = new QStandardItem("Item3");pSourceItem->setCheckable(true);pSourceItem->setTristate(false);pSourceTreeModel->appendRow(pSourceItem);QTreeView* treeView = new QTreeView(this);treeView->setEditTriggers(QAbstractItemView::NoEditTriggers);treeView->setModel(pSourceTreeModel);treeView->setColumnWidth(0, 250);treeView->setColumnWidth(1, 50);setCentralWidget(treeView);// Frank End here}
当您将鼠标悬停在项目上时,检查状态将更改或发生其他意外响应。
Qt商业组件Qtitan推荐:
- QtitanRibbon| 下载试用: 遵循Microsoft Ribbon UI Paradigm for Qt技术的Ribbon UI组件,致力于为Windows、Linux和Mac OS X提供功能完整的Ribbon组件。
- QtitanChart | 下载试用 : 是一个C ++库,代表一组控件,这些控件使您可以快速地为应用程序提供漂亮而丰富的图表。并且支持所有主要的桌面操作系统。
- QtitanDataGrid| 下载试用 : 适用于Qt的商业化DataGrid 组件,使得表格数据可以直接面向终端用户完全集成了QtDesigner,极易适应其他相似开发环境,保证100%兼容Qt GUI。
感谢您的阅读,希望这篇文章能带给你一定的帮助!如果这篇文章没能满足你的需求、点击获取更多文章教程!现在立刻下载Qt6免费试用吧!更多Qt类开发工具QtitanRibbon、QtitanChart、QtitanNavigation、QtitanDocking、QtitanDataGrid在线订购现直降1000元,欢迎咨询在线客服获取更多优惠>>
标签:
声明:本站部分文章及图片源自用户投稿,如本站任何资料有侵权请您尽早请联系jinwei@zod.com.cn进行处理,非常感谢!