Share your knowledge at the LQ Wiki.
Go Back > Blogs
User Name



GUI coding. A peek at run-time inheritance (method lookups)

Posted 04-20-2012 at 09:23 AM by rainbowsally
Updated 04-20-2012 at 09:26 AM by rainbowsally

GUI coding. A peek at run-time inheritance (method lookups)

In previous blog entries we built QT's example/desktop/screenshot application and did a bit of tracing with a debugger.

Let's take a look at the metaobject definition file (moc_screenshot.cpp) next.

This is where QT implements a class' method inheritance. It looks up 'methods' from the widget's parent first, then if parent doesn't handle the '_id' we try it here, and if we don't handle it...
Posted in Uncategorized
Views 298 Comments 0 rainbowsally is offline

GUI coding. The 4 main parts of a typical GUI toolkit

Posted 04-19-2012 at 02:34 PM by rainbowsally
Updated 04-19-2012 at 02:51 PM by rainbowsally (clarification of 'metaobject' purpose in last line)

Let's start slow.

First of all, most of the GUI toolkits including QT4 are set up in the following steps, and in this order.
  1. Create an application, possibly with commandline args. (If not created explicitly this 'application' thing will already exist somewhere.)
  2. Create a main widget with the 'application' thingie as its parent.
  3. Show the main widget.
  4. Run the application event loop.

The 'application' is the main event dispatcher which translates X events...
Posted in Uncategorized
Views 341 Comments 0 rainbowsally is offline

GUI coding: First Stop QT4

Posted 04-18-2012 at 03:55 PM by rainbowsally
Updated 04-18-2012 at 03:57 PM by rainbowsally (misspelled title)

First of all, let me say that I've needed a widget that acts like a terminal -- like forever -- and I've checked out a LOT of toolkits having various degrees of success with each.

Perhaps oddly, tk was the best. QT4 was the worst. I subclassed a text editor widget and YOW! was it ever slow!! But I think we'll give QT another look and this is why.

I've checked out many toolkits including
  • tcl/tk (and variants)
  • xclass and xforms and it's descendants
  • fltk v 1.x
  • fltk
Posted in Uncategorized
Views 6492 Comments 2 rainbowsally is offline

New versions links (mc2, libLQ, new-make)

Posted 04-16-2012 at 09:46 PM by rainbowsally

Latest mc2 (automatic makefile creator) and libLQ (our first library) are here.

For the Computer Mad Scientists, you might find uncmake/uncmakefile Usr2usr, and the make-based binary package installer uninstaller utilities interesting as well.

Uncmake latest will be posted here:
Posted in Uncategorized
Views 319 Comments 0 rainbowsally is offline

UsR2usr (libLQ version)

Posted 04-15-2012 at 05:42 PM by rainbowsally

Here's UsR2usr version 1.5 (using libLQ)

file: src/Usr2usr.cpp
purpose: allows dummy installations and renaming of paths and rpaths for creating binary installations without committing to overwriting original files until you're ready.
// UsR2usr.cpp

#include <stdio.h>        // printf, sprintf, etc.
#include <stdlib.h>       // exit()
#include <unistd.h>       // tons of stuff
#include <malloc.h>
Posted in Uncategorized
Views 315 Comments 0 rainbowsally is offline


All times are GMT -5. The time now is 05:51 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration