博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理
上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 68 下一页

2012年12月30日

摘要: Q_PROPERTY()--自定义类属性#ifndef ICONEDITOR_H#define ICONEDITOR_H#include <QColor>#include <QImage>#include <QWidget>class IconEditor : public QWidget{ Q_OBJECT Q_PROPERTY(QColor penColor READ penColor WRITE setPenColor) Q_PROPERTY(QImage iconImage READ iconImage WRITE setIconImage) Q_P 阅读全文

posted @ 2012-12-30 10:42 星尘的天空 阅读(862) 评论(0) 推荐(0) 编辑

摘要: Splash Screens如何为QT创建一个闪屏Many applications present a splash screen at startup, such as the one shown in Figure 3.18. Some developers use a splash screen to disguise a slow startup, while others do it to satisfy their marketing departments. Adding a splash screen to Qt applications is very easy using 阅读全文

posted @ 2012-12-30 10:04 星尘的天空 阅读(357) 评论(0) 推荐(0) 编辑

2012年12月28日

摘要: NewWords/500-600努力学好英语:1:regime 政权,2:atrocity n 暴行3:unconditional adj 无条件的;绝对的;无限制的4:surrender vt 投降,放弃;交出;听任5:ironic adj 讽刺的;反话的6:despite 尽管,不管7:silly adj 傻瓜的8:squabble vt 发生口角;大声争吵, 弄乱,9:profitable adj 有利可图的;赚钱的;有益的10:decade n 十年,decades 数十年11:thrive vt 繁荣,兴旺;茁长成长12:informed adj 消息灵通的;见识多广的 vt 通知, 阅读全文

posted @ 2012-12-28 21:35 星尘的天空 阅读(194) 评论(0) 推荐(0) 编辑

摘要: Qt simplifies the programming of menus and toolbars through its action concept. An action is an item that can be added to any number of menus and toolbars. Creating menus and toolbars in Qt involves these steps:Create and set up the actions.Create menus and populate them with the actions.Create tool 阅读全文

posted @ 2012-12-28 17:14 星尘的天空 阅读(326) 评论(0) 推荐(0) 编辑

摘要: QT,错误 1 error PRJ0019: A tool returned an error code from "Rcc'ing resource.qrc..." gotocell gotocell问题:在QT工程中,创建一个资源文件*.qrc后,编译工程,然后就爆出上面的错误。然后就在网络中查找答案,不幸的是,到最后也没有找到合适的解决方式,最后通过对比两个工程才解决了该问题1:在工程中间单击 *.qrc 文件,选择“属性项目"2:展开 custom build Step3:选中 General4:查看Command Line 命令行"$( 阅读全文

posted @ 2012-12-28 16:21 星尘的天空 阅读(1451) 评论(0) 推荐(0) 编辑

摘要: Dynamic dialogs are dialogs that are created from Qt Designer .ui files at run-time. Instead of converting the .ui file to C++ code using uic, we can load the file at run-time using the QUiLoader class:QUiLoader uiLoader;QFile file("sortdialog.ui");QWidget *sortDialog = uiLoader.load(& 阅读全文

posted @ 2012-12-28 11:06 星尘的天空 阅读(605) 评论(0) 推荐(0) 编辑

摘要: 关于添加Q_OBJECT后引发的错误Q_OBJECT:The Q_OBJECTmacro at the beginning of the class definition is necessary for all classes that define signals or slots.在QGIS中,对于那些在类中需要添加 信号槽的类,就需要在该类定义的时候的添加 Q_OBJECT这个宏命令,这个是必须的To compile the program, run qmake as usual. Since the FindDialog class definition contains the Q 阅读全文

posted @ 2012-12-28 10:18 星尘的天空 阅读(1982) 评论(0) 推荐(0) 编辑

2012年12月27日

摘要: tr()The tr() function calls around the string literals mark them for translation to other languages. The function is declared in QObject and every subclass that contains the Q_OBJECT macro. It's a good habit to surround user-visible strings with tr(), even if you don't have immediate plans f 阅读全文

posted @ 2012-12-27 13:59 星尘的天空 阅读(193) 评论(0) 推荐(0) 编辑

摘要: QT中的关键字signalsThe signals keyword is actually a macro. The C++ preprocessor converts it into standard C++ before the compiler sees it.THE END!2012年12月27日 阅读全文

posted @ 2012-12-27 13:40 星尘的天空 阅读(111) 评论(0) 推荐(0) 编辑

摘要: Q_OBJECTThe Q_OBJECT macro at the beginning of the class definition is necessary for all classes that define signals or slots.THE END!2012年12月27日 阅读全文

posted @ 2012-12-27 13:36 星尘的天空 阅读(135) 评论(0) 推荐(0) 编辑

上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 68 下一页