LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Blogs > rainbowsally
User Name
Password

Notices

Uncategorized Entries with no category
Old

QT4 GUI Programming: Center Window

Posted 05-28-2012 at 12:50 AM by rainbowsally

Today's Features:
  • Center a non-dialog window in qt4.

If you have mc2, 'mc2 -fetch qt4' for the Makefile, otherwise, do whatever you do to get this rolling.

Here are the files for this demo/test.

file: src/main.cpp
Code:
// generic C++ source template created by new.main

#include <stdio.h>  // printf(), FILE*, etc.
#include <malloc.h> // malloc(), free()
#include <string.h> // strcpy(), memcpy(), etc.
...
Member
Posted in Uncategorized
Views 818 Comments 0 rainbowsally is offline
Old

qt type id test/demo

Posted 05-27-2012 at 09:38 PM by rainbowsally
Updated 05-27-2012 at 09:40 PM by rainbowsally

Today's features:
  • Use C++ typeid's to compare or check types.
  • Share base64 encoded compressed file/dir data in message forums (example).

The typeid(obj) doesn't require QT, but it also works with it. Here's a simple makefile and a widget to show some type ids and how to compare
them.

After running this you should have a folder named typeid-test. Type 'make' inside that folder to create the 'main' executable.

Requires base64, QT4, make, gcc, and all that...
Member
Posted in Uncategorized
Views 660 Comments 0 rainbowsally is offline
Old

libLQ-qt-mc2 with qt4 support

Posted 05-27-2012 at 09:22 PM by rainbowsally
Updated 09-27-2013 at 04:19 PM by rainbowsally (new version)

[See note at the bottom IF you have a problem such as:
Code:
  libLQ-qt.so: undefined reference to `obj_copy_op(char**, char*, char*)'
  libLQ-qt.so: undefined reference to `obj_delete_op(char*, char*)'
which you probably won't.
]

This is libLQ with qt support and mc2 (the makefile creator, second generation).

update Sept 27, 2013
http://rainbowsally.net/rainbowsally...x-3.1.3.tar.gz

Uninstall, but...
Member
Posted in Uncategorized
Views 929 Comments 0 rainbowsally is offline
Old

Precompiled cint dlls for linux (ix86) here

Posted 05-26-2012 at 03:49 AM by rainbowsally
Updated 09-04-2013 at 10:10 PM by rainbowsally (arch note)
Tags cint, compiling

These go into
Code:
/usr/local/share/cint/cint/include
by default.

If you have relocated your cint installation, I'm not sure they'll work.

Also I haven't gotten the gl stuff working yet, but if you've had trouble getting these to compile, here's what we have.

They are named '*.dll' but they are linux ELF binaries, and they go into the include folder with the header files so that cint can find them.

http://rainbowsally.net/rainbowsally...de-dlls.tar.gz...
Member
Posted in Uncategorized
Views 372 Comments 0 rainbowsally is offline
Old

Example: sig-handler funcs for C and C++ (throw-catch) PART 2

Posted 05-13-2012 at 11:37 PM by rainbowsally
Updated 05-14-2012 at 07:39 AM by rainbowsally (possible cpu hang if -O2 switch is used)

UPDATE:
Note: The signal-handler files can't be compiled with the -O2 switch and it's probably best if you only trap the signals you really intend to redirect, such as SIGSEGV (11). If you compile what we have here with the -O2 switch your cpu may hang if you try to exit using Ctrl-C for example. See implementation notes added to signal-handler.c below.

See part 1 for main functions to test this in C and C++.

To throw and catch stuff like segfaults in C++ it's...
Member
Posted in Uncategorized
Views 1056 Comments 0 rainbowsally is offline

  



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

Main Menu

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