pikopong

it's all about knowledge

Fixing Blank Help in Qt Creator

without comments

I just upgraded my SDK to Qt SDK 4.6.2 and installed Qt Creator 1.3.1. After running both editors (from the SDK and the one that I installed separately), I noticed that I’m getting blank pages in my help. I can’t search for any documentation. However, I can open the help file manually from the terminal (won’t work if your Qt is not in the PATH).

amree@pikopong:~$ assistant

Anyway, to solve it, we just need to point the the correct help file.

  1. Open your Qt Creator.
  2. Go to Tools > Options…
  3. Open the Documentation section.
  4. Clear everything you have in the list of Registered Documentation.
  5. Now, we must add all the help files back. The help files should be ending with .qch as the extension. Click Add… and browse to the directory where the help files are located.
    /* ----------------------------------------------------
     * LINUX
     *
     * Assuming your main SDK installation directory
     * is at '/opt/qt/qtsdk-2010.02'
     * ----------------------------------------------------/
    /opt/qt/qtsdk-2010.02/qt/doc/qch/assistant.qch
    /opt/qt/qtsdk-2010.02/qt/doc/qch/designer.qch
    /opt/qt/qtsdk-2010.02/qt/doc/qch/linguist.qch
    /opt/qt/qtsdk-2010.02/qt/doc/qch/qmake.qch
    /opt/qt/qtsdk-2010.02/qt/doc/qch/qt.qch
     
    // If you're going to use the editor from the SDK, add this one too
    /opt/qt/qtsdk-2010.02/share/doc/qtcreator/qtcreator.qch
    /* ----------------------------------------------------
     * WINDOWS
     *
     * Assuming your main SDK installation directory
     * is at 'C:\Qt\2010.02.1'
     * ----------------------------------------------------/
    C:\Qt\2010.02.1\qt\doc\qch\assistant.qch
    C:\Qt\2010.02.1\qt\doc\qch\designer.qch
    C:\Qt\2010.02.1\qt\doc\qch\linguist.qch
    C:\Qt\2010.02.1\qt\doc\qch\qmake.qch
    C:\Qt\2010.02.1\qt\doc\qch\qt.qch
     
    // If you're going to use the editor from the SDK, add this one too
    C:\Qt\2010.02.1\share\doc\qtcreator\qtcreator.qch
    /*
     * If your are using different editor (other than the one from SDK),
     * make sure you add the help file for the editor too.
     * The path for Linux and Windows should be the same
     */
    %QTCREATOR_INSTALLATION_PATH%/share/doc/qtcreator/qtcreator.qch
  6. Maybe there’ll be more files, just add every help files in the directory. Click OK and you’ll get your help files back. Good luck !

Written by amree

April 11th, 2010 at 3:56 pm

Posted in guides

Tagged with ,

Fix Windows 7 with Eset NOD32 Antivirus = Memory Leak

without comments

Story

I was downloading some movies references from the Internet. I left it to download for overnight since it was a very big file (around 4.48 GB). When I checked it in the morning, I found out that the download stopped working after a few hours I left it. Flashget says it cannot write to the hardisk anymore. Furthermore, the bluetooth suddenly stopped working and I’m having a hardtime running anything. I can’t even shutdown the PC properly as if there’s no memory left even though I’m not running any software at all. After a few times trying, I managed to open Task Manager and it comfirms that something went wrong and every memory I have is being used by something and cannot be killed.

Symptoms

Windows hang, hardisk LED blinking non stop, can’t even shutdown properly, can’t launch any new programs, Bluetooth stopped working and so on

Cause(s)

Who knows, Microsoft said it was the third party antivirus and firewall programs (in this particular case is Eset NOD32) even though that antivirus works fine in other Windows version

Solutions

  1. Uninstall Eset NOD32 Antivirus and install something else for your protection.
  2. Uninstall Windows 7 and start using Open Source OS such as the almighty Ubuntu Slackware.
  3. Install this fix http://support.microsoft.com/kb/979223 (works for me).

Written by amree

April 8th, 2010 at 2:51 pm

Posted in guides

Tagged with ,

Configuring Linux to work with NVIDIA Hybrid SLI Technology

with one comment

First of all, at the time of this writing, NVIDIA Hybrid SLI Technology is not supported on Linux and without proper configuration, you won’t even be able to load your Desktop Environment such as Xfce.

That’s not the only problem, based on an interview with NVIDIA’s Tom Petersen, one of its main feature is called HybridPower which basically allows users to shut off the graphics card when not needed and dramatically reduce power consumption. This means, there is a possibility that if we can’t find a way to turn off the second GPU, it will consume more power that it should be. But that’s another problem. Right now, we want to boot into our Desktop Environment properly.

  1. Running
    amree@pikopong:~$ startx
    (!!) More than one possible primary device found
    (--) PCI: (0:2:0:0) 10de:06e8:1028:0271 rev 161, Mem @ 0xae000000/16777216, 0xd0000000/268435456, 0xac000000/33554432, I/O @ 0x00004000/128
    (--) PCI: (0:3:0:0) 10de:0866:1028:0271 rev 177, Mem @ 0xaa000000/16777216, 0xb0000000/268435456, 0xcc000000/33554432, I/O @ 0x00005000/128, BIOS @ 0x????????/131072

    gave me some errors from my

    /var/log/Xorg.0.log
  2. Login as a root and run the command below
    root@pikopong:~# nvidia-xconfig

    This is to generate the right configuration for your X.

  3. Get the list of the GPUs.
    root@pikopong:~# lspci
    02:00.0 VGA compatible controller: nVidia Corporation G98 [GeForce 9200M GS] (rev a1)
    03:00.0 VGA compatible controller: nVidia Corporation C79 [GeForce 9400M G] (rev b1)

    You will get a long list of devices connected to your PCI buses. We are only interested with the VGA controller.

  4. As you can see, we have two VGA controller, we need to specify which one we would like to use.
    root@pikopong:~# nano /etc/X11/xorg.conf
  5. Go to your Device section and set Bus ID for your controller in it. So, in the end, if I chose the second controller, my Xorg.conf would somehow look like this:
    1
    2
    3
    4
    5
    6
    7
    
    Section "Device"
        Identifier     "Device0"
        Driver         "nvidia"
        VendorName     "NVIDIA Corporation"
        BoardName      "GeForce 9400M G"
        BusID          "PCI:3:0:0"
    EndSection
  6. The configuration is simple, you just need to add the 6th line. Just make sure you put it in the correct format PCI:X:X:X, X possibly refers to the last 3 digit number in your error log

Written by amree

February 21st, 2010 at 10:31 pm

Posted in linux

Tagged with , ,

Malaysia Human Resources Statistics in Healthcare Sector

with 2 comments

This was published in May 2009 (Profession:Population)

  1. Doctors (1:1,105)
  2. Dentists (1:7,618)
  3. Pharmacists (1:4,335)
  4. Opticians (1:11,030)
  5. Optometrists (1:40,128)
  6. Asst. Medical Officers (1:3,054)
  7. Asst. Pharmacy Officers (1:9,982)*
  8. Asst. Environmental Health Officers (1:10,806)*
  9. Medical Lab. Technologists (1:6,865)*
  10. Occupational Therapists (1:65,091)*
  11. Physiotherapists (1:46,760)*
  12. Radiographers (1:18,267)*
  13. Nurses (1:512)
  14. Dental Nurses (1:12,124)
  15. Community Nurses (1:1,487)
  16. Dental Technicians (1:18,786)
  17. Dental Surgery Assistants (1:9,336)
  18. Traditional & Complementary Medicine Practitioners (1:3,173)**

Source:

  1. Human Resource Devision, Ministry of Health
  2. Malaysian Medical Council
  3. Malaysian Dental Council
  4. Pharmacy Board Malaysia
  5. Malaysia Optical Council
  6. Medical Assistant Board
  7. Malaysia Nursing Board
  8. Oral Health Division, Ministry of Health
  9. Traditional & Complementary Medicine Division, Ministry of Health

Notes:

  • *: Ministry of Health only
  • **: Refers to voluntary registration by local practitioners & application for professional visa by foreign practitioners

Download the full version (pdf) from here.

Written by amree

November 26th, 2009 at 1:03 pm

Posted in husm

Tagged with , ,

How to enable MySQL support in Qt SDK for Linux

with 5 comments

  1. Download Qt SDK for Linux/X11 at Qt Software.
  2. Install it anywhere you want, just make sure you remember the path.
  3. To build MySQL as a plugin, you need to know two other paths:
    • Your MySQL header files directory. It should be something like this:
      decimal.h   m_string.h      my_dbug.h    my_list.h        my_sys.h     mysql_embed.h    mysqld_error.h  sql_state.h        typelib.h
      errmsg.h    my_alloc.h      my_dir.h     my_net.h         my_xml.h     mysql_time.h     raid.h          sslopt-case.h
      keycache.h  my_attribute.h  my_getopt.h  my_no_pthread.h  mysql.h      mysql_version.h  readline.h      sslopt-longopts.h
      m_ctype.h   my_config.h     my_global.h  my_pthread.h     mysql_com.h  mysqld_ername.h  sql_common.h    sslopt-vars.h
    • Your MySQL lib files directory. Something like this:
      libdbug.a    libmyisammrg.a      libmysqlclient.so@         libmysqlclient_r.a    libmysqlclient_r.so.15@      libmysys.a
      libheap.a    libmysqlclient.a    libmysqlclient.so.15@      libmysqlclient_r.la*  libmysqlclient_r.so.15.0.0*  libvio.a
      libmyisam.a  libmysqlclient.la*  libmysqlclient.so.15.0.0*  libmysqlclient_r.so@  libmystrings.a
  4. For Slackware 12.2, it should be:
    1
    2
    
    /usr/include/mysql	# MySQL header directory
    /usr/lib/mysql		# MySQL libraries
  5. Go to your Qt SDK installation directory, mine is: /opt/qtsdk-2009.03/
    1
    2
    3
    4
    5
    6
    
    cd /opt/qtsdk-2009.03/
    cd qt/src/plugins/sqldrivers/mysql/
    # Replace all the path based on your computer environment. 
    # Make sure 'qmake' can be run from anywhere or you'd have to specify the full path for it.
    qmake -o Makefile "INCLUDEPATH+=/usr/include/mysql" "LIBS+=-L/usr/lib/mysql -lmysqlclient" mysql.pro
    make
  6. You should have new files created for you:
    Makefile
    README
    libqsqlmysql.so*
    main.cpp
    main.o
    moc_qsql_mysql.cpp
    moc_qsql_mysql.o
    mysql.pro
    qsql_mysql.moc
    qsql_mysql.o
  7. Copy MySQL plugin to your Qt’s plugins directory,
    cp libqsqlmysql.so /opt/qtsdk-2009.03/qt/plugins/sqldrivers
  8. Create new project and put these codes to test your new plugin
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    
    #include <QCoreApplication>
    #include <QtSql>
     
    int main(int argc, char *argv[])
    {
        QCoreApplication a(argc, argv);
     
        qDebug() << QSqlDatabase::drivers();
     
        return a.exec();
    }

    You’ll get these outputs showing that your Qt has supports for MySQL

    ("QSQLITE", "QMYSQL3", "QMYSQL")

Written by amree

July 22nd, 2009 at 3:21 pm

Posted in programming

Tagged with , , ,