☆Smoozer☆

::Easy Life.

随笔分类 -  学习

如何通过suse linux的单用户模式修改root密码
摘要:1. 启动grub时候选择 Failsave, 下面的“boot option“内容全部删除,写入init=/bin/bash,进入单用户模式2. 稍等会出现命令行 (none)#: #mount -o remount, rw / [enter] //根文件系统重新mount为可读写,有了读写权限后就可以通过passwd命令修改密码了 #cd /usr/bin [enter... 阅读全文

posted @ 2010-02-02 15:36 smoozer 阅读(1590) 评论(0) 推荐(0)

How to build QMySQL and QOci plugin for QT4
摘要:Here are sumary about building database plug-ins when using Qt4.1. MySQL:You need to get the MySQL installation files. RunSETUP.EXEand choose "Custom Install". Install the "Libs & Include Files" M... 阅读全文

posted @ 2010-01-27 13:58 smoozer 阅读(429) 评论(0) 推荐(0)

QT4: how to build QOCI (for linux and windows)
摘要:以oracle 10g express edition (10.2.0)为例:How to build QOCI under linux platform:1st:cd $QTDIR/src/plugins/sqldrivers/oci2nd:qmake "INCLUDEPATH+=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/rdbms/... 阅读全文

posted @ 2009-07-07 17:15 smoozer 阅读(1034) 评论(0) 推荐(0)

如何处理QToolBox上QToolBoxButton的click事件?
摘要:Problem:QToolBox,QTabWidget,QTabBar是通过currentChanged(int)这个signal来得到当前的currentIndex改变的。Suppose在QToolBox上有3个QToolBoxButton, 每个QToolBoxButton下又有2个item,当我选中第二个QToolBoxButton下的任意一个item的时候,这时候QToolBox的curr... 阅读全文

posted @ 2009-06-19 20:54 smoozer 阅读(3071) 评论(0) 推荐(0)

我遇到的“QWidget: Must construct a QApplication before a QPaintDevice”问题
摘要:一个QT程序,在Windows下编译运行正常;现在在Linux下编译成功之后运行的时候,程序却异常退出,命令行提示:QWidget: Must construct a QApplication before a QPaintDevice。字面意思是必须在一个QPaintDevice对象(这里是QWidget,QWidget是QPaintDevice的子类)之前,先创建好QApplication对象... 阅读全文

posted @ 2009-06-12 20:14 smoozer 阅读(5513) 评论(1) 推荐(0)

Linux下oracle 10g的错误:ORA-01034, ORA-27101 and ORA-00600
摘要:新装的一台机器,无法运行程序,报错:ORA-01034: ORACLE not availableORA-27101: shared memory realm does not exist这两个错误的原因可能是: ORACLE_SID或ORACLE_HOME没有设置正确。对normal users来言,或者是oracle数据库没有启动。对remote users,可能listener有问题。 解决... 阅读全文

posted @ 2009-05-21 13:18 smoozer 阅读(11926) 评论(0) 推荐(0)

如何显示system tray icon
摘要:int main(int argc, char *argv[]){  QApplication app(argc, argv);  ...  tabwidget_ui_demo w; // main window  QObject::connect(&w, SIGNAL(sigbtnQuitClicked()), &app, SLOT(quit()));  w.show(); //... 阅读全文

posted @ 2009-05-19 18:01 smoozer 阅读(2224) 评论(0) 推荐(0)

[原创]探讨多个QRadioButtons的AutoExclusive的问题
摘要:在写代码的过程中, 遇到一个问题:原来有一个UI文件, 将5个RadioButton分成2组, 前三个(例如: radioBtn1,radioBtn2, radioBtn3)和后两个(radioBtn4, radioBtn5)各放在一个VeticallyLayout里. QT Designer中的截图如下所示: 在代码里, 两组都可以独立工作, 互不干扰. 以下为例:void testFun()... 阅读全文

posted @ 2009-02-20 10:41 smoozer 阅读(3689) 评论(0) 推荐(2)

如何使用ctags
摘要:把自己觉得有用的关于ctags的几个命令, 做个备份. 具体的命令还是要参考VIM的用户手册.1. 在某个目录下, 建立tags.bj@cnpc0830:~/qt-x11-opensource-src-4.4.1/src/gui> ctags -R .这样,会在当前目录下生成tags文件.2. 将tags文件加入.vimrc.bj@cnpc0830:~/qt-x11-opensource-src-... 阅读全文

posted @ 2009-02-11 10:23 smoozer 阅读(6026) 评论(1) 推荐(0)

QT的Event Filter[翻译]
摘要:一直对Event Filter似懂非懂, 通过看C++ GUI Programming with Qt4, Second Edition, 争取搞明白. 顺便自己把英文翻译成中文, 算是自己做的笔记了.Installing Event FiltersQT事件模块一个真正强大的特性是可以设置一个QObject的实例去监测另外一个QObject实例的事件,在被监测的实例see之前.假设我们有一个Cus... 阅读全文

posted @ 2009-02-09 11:25 smoozer 阅读(8623) 评论(1) 推荐(2)

qt-vsintegration安装失败原因——原是杀软惹的祸
摘要:安装qt-vsintegration-1.4.1.exe,安装了无数遍,死活安装不成功。安装到一定阶段就弹出can not register QtProjectEngineLib.dll、formeditor1、package之类的提示框,之后打开VS发现option里的QT页是空的,无法显示。FT!从网上搜索解决方案,无果。可是,我在公司用的时候是ok的啊。两台笔记本的软件上的区别也不大啊?难道是--杀毒软件?关掉试试,DONE!原来是杀毒软件惹的祸!!![2012/01/30] - 更换了laptop,这次再装,formeditor1.dll如何也装不上了。因为是安装的symantec e 阅读全文

posted @ 2009-02-08 11:49 smoozer 阅读(1104) 评论(4) 推荐(0)