LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Blogs
User Name
Password

Notices

Old

GUI Programming: Exposing the main event loop (Subclassing QApplication)

Posted 05-02-2012 at 06:23 AM by rainbowsally
Updated 05-02-2012 at 06:25 AM by rainbowsally

GUI Programming: Exposing the main event loop (Subclassing QApplication)

Today's features
  • a QTextEdit in 4 lines of code.
  • subclassing QApplication to view ALL objects and events as they are processed.
  • how to preempt events in QT

It looks like this is about the only way to actually preempt messages in QT4.

This is NOT the same as installEventFilter() which is simple and useful for many things but runs too late in a series of dispatches to preempt or change...
Member
Posted in Uncategorized
Views 534 Comments 0 rainbowsally is offline
Old

QT4 Property dump example. (simple terminal app)

Posted 04-30-2012 at 02:24 AM by rainbowsally

This code just prints out the properties (and where they come from) for one widget. You can see the dump around the middle of this blog entry.

A full blown version would require a LOT of includes and libs and a way to replace a "ClassName" string in the file with the actual class we want to dump. (See "%s" in three places below.)

file: src/qt4-props.cpp
Code:
// file: qt4-props.cpp - lists all properties for (in this case)
// a
...
Member
Posted in Uncategorized
Views 424 Comments 0 rainbowsally is offline
Old

QT4 GUI testing and experiments (including sub-attaq and tooltips)

Posted 04-29-2012 at 12:43 AM by rainbowsally
Updated 09-04-2013 at 10:15 PM by rainbowsally (stuff like what? stuff like missing xml files happens (clarification))

Sorta back on track after some false starts and tweekage on the mc2 makfile creator...

Here's a few things that might be interesting that I cooked up while testing mc2 on QT examples and demos.

If nothing else you might be interested to see that *.pro files are NOT required to compile these things (there are some download links below).

------------------

If you want it, here's a utility to create a new ui file from scratch that will open...
Member
Posted in Uncategorized
Views 450 Comments 0 rainbowsally is offline
Old

Enabling qt examples in openSUSE & new mc2 version uploaded.

Posted 04-27-2012 at 05:05 PM by rainbowsally
Updated 09-04-2013 at 10:14 PM by rainbowsally

Enabling qt examples in openSUSE and new mc2 version uploaded.

PART 1.

The issue: The examples in openSUSE 11.4 expect their resources to be in
Code:
/usr/lib/qt4/examples
which did not exist on my system.

I can no longer verify this as an 11.4 issue easily but it appears that in openSUSE we may need a symlink under /usr/lib/qt4 pointing to /usr/share/qt4/examples in order for the qt examples to run.

Code:
ls /usr/lib/qt4/examples
...
Member
Posted in Uncategorized
Views 388 Comments 0 rainbowsally is offline
Old

qt designer help without the enableRemoteControl switch

Posted 04-26-2012 at 04:02 PM by rainbowsally

In case you missed it (the blog entry), qt designer tries to go online whenever you click on the help button. This can cause the help to hang for quite a long time if your user doesn't have internet access or you might just dislike the decisions made by the developers and prefer to stay in your own neighborhood.

If you didn't "miss it" but you had trouble with a hex editing the commandline for the assistant client, here's the one that I created. It should work on openSUSE...
Member
Posted in Uncategorized
Views 274 Comments 0 rainbowsally is offline

  



All times are GMT -5. The time now is 12:03 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration