qtpropertybrowser for python

June 12th, 2011

Did a lot of digging around to figure this one out.

download qt-solutions

change the common.pri file of the property grid this line

QTPROPERTYBROWSER_LIBNAME = $$qtLibraryTarget(QtSolutions_PropertyBrowser-2.5)

made a qtpropertybroser folder in my user/local/ folder

2396  sudo mkdir /usr/local/include/qtpropertybrowser
2397  sudo cp *.h /usr/local/include/qtpropertybrowser/

also copied the librarys to the /usr/local/lib

2455  chmod 644 libQtSolutions_PropertyBrowser-2.5.so*
2456  sudo cp libQtSolutions_PropertyBrowser-2.5.so* /usr/local/lib/

luckly someone made a sip file and I got to avoid figuring out that mess….

svn co https://booggie.svn.sourceforge.net/svnroot/booggie/projects/Booggie/QtPropertyBrowserBindings/trunk QtPropertyBrowserBindings

I had to install some ubuntu python-qt-dev files for the next part, can’t remeber the exact packages sorry, let me know if you know what they were.

python configure.py –qtpropertybrowser-lib-path=/usr/local/lib –qtpropertybrowser-include-path=/usr/local/include/qtpropertybrowser/

make

sudo make install

I now was able to run the example.

Sam Uncategorized

Autostart python

April 17th, 2011

if __name__ == “__main__”:
import sys
from PyQt4 import QtCore, QtGui
app = QtGui.QApplication(sys.argv)
ui = MainWindow()
ui.show()
sys.exit(app.exec_())

Sam Uncategorized , ,

GDB C data array print

April 10th, 2011

define c_print
set $size = sizeof($arg0)
set $point = (char*) &$arg0
printf “char data[%d] = { “, $size
set $index = 0
while $index < ($size-2)
printf “0x%x, “, (char)$point[$index]
set $index = $index + 1
end
printf “0x%x };\n”, (char)$point[($size-1)]

end

Sam Uncategorized , ,

diff and patch

October 15th, 2010

diff -rupNw -I \$Id old_folder new_folder > mypatch.patch
mv mypatch.patch old_folder
cd old_folder
patch -p1 < mypatch.patch

Sam Uncategorized

Selecting an Epoch to count from

April 30th, 2010

When starting a project a good way to select an epoch would be to select the closest year in the past that is divisible by 400.

This will simplify time conversions to / from days since epoch to years as
Years that are evenly divisible by 100 are not leap years, unless they are also evenly divisible by 400, in which case they are leap years.

Sam Uncategorized

Naming Convention

October 26th, 2009

Class_Name

Structure_Name
variable_name

MethodName
_argument_name

Sam Uncategorized

Change SVN Editor

October 7th, 2009

in bash type
export SVN_EDITOR=gedit

Sam Uncategorized , ,

CFLAGS to get assembly and c code together

October 5th, 2009

export CFLAGS = -Wall -g -Wa,-a,-ad,-ahls=$@.lst

Sam Uncategorized

svn & kompare

September 24th, 2009

svn diff -r500 | kompare -o -
svn diff -r549:551 | kompare -o -

Sam Uncategorized , ,

Blue Ink

September 19th, 2009

Weird thing about some government forms is you cant use blue ink. There should be a list of reasons for this. Here are some of my suggestions.

And the color shall be black. Not Grey, nor green or yellow. Red is right out.

If any other color than black is used the writer shall perform tracing jobs over all blue.

The reader of this document may be color blind to any color than black.

Sam Uncategorized