Skip to content

Instantly share code, notes, and snippets.

"" Custom vim settings
"No need to be vi compatible.
:set nocompatible
"Searching
:set incsearch "Turn on incremental searching
:set ignorecase "Ignore case when searching
:set smartcase "Ignore case when typing lowercase,
"otherwise match case
QPushButton = *myButton;
myGridLayout->addWidget (myButton, 0, 0, Qt::AlignLeft);
QPushButton = *myButton;
myButton = new QPushButton ("button's text");
myGridLayout->addWidget (myButton, 0, 0, Qt::AlignLeft);
myTextEdit->moveCursor (QTextCursor::End);
myTextEdit->insertPlainText (myString);
myTextEdit->moveCursor (QTextCursor::End);
QTextCursor prev_cursor = myTextEdit->textCursor();
myTextEdit->moveCursor (QTextCursor::End);
myTextEdit->insertPlainText (myString);
myTextEdit->setTextCursor (&prev_cursor);
export PYTHONPATH=/usr/local/lib/python2.7/site-packages:$PYTHONPATH
#Code copied from: http://bit.ly/13yRYU4
#And later modified a bit.
from PyQt4 import QtGui
from PyQt4 import QtCore
from PyQt4.QtCore import pyqtSlot,SIGNAL,SLOT
import sys
class MyMainWindow(QtGui.QMainWindow):
$ brew install pyqt
$ sudo nano ~/.bash_profile
#####
# The path to use the PyQt module and others installed using homebrew
export PYTHONPATH=/usr/local/lib/python2.7/site-packages:$PYTHONPATH
#####