LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Blogs
User Name
Password

Notices


Old

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

Posted 04-20-2012 at 08:23 AM by rainbowsally
Updated 04-20-2012 at 08: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...
Member
Posted in Uncategorized
Views 552 Comments 0 rainbowsally is offline
Old

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

Posted 04-19-2012 at 01:34 PM by rainbowsally
Updated 04-19-2012 at 01: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...
Member
Posted in Uncategorized
Views 546 Comments 0 rainbowsally is offline
Old

GUI coding: First Stop QT4

Posted 04-18-2012 at 02:55 PM by rainbowsally
Updated 04-18-2012 at 02: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
...
Member
Posted in Uncategorized
Views 10494 Comments 2 rainbowsally is offline
Old

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

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

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

http://www.linuxquestions.org/questi...eration-34648/

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:
http://www.linuxquestions.org/questi...lations-34669/...
Member
Posted in Uncategorized
Views 578 Comments 0 rainbowsally is offline
Old

UsR2usr (libLQ version)

Posted 04-15-2012 at 04: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.
Code:
// UsR2usr.cpp

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

  



All times are GMT -5. The time now is 09:50 PM.

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