Small things

This commit is contained in:
Olivier Keshavjee 2015-06-24 20:41:23 +02:00
parent 38b055081e
commit ef85e48916
4 changed files with 9 additions and 4 deletions

View file

@ -161,7 +161,7 @@ class plotModel(QStandardItemModel):
parentItem.takeRow(index.row())
def updatePlotPersoButton(self):
menu = QMenu()
menu = QMenu(self.mw)
menus = []
for i in [self.tr("Main"), self.tr("Secondary"), self.tr("Minor")]:

View file

@ -42,7 +42,7 @@ class fullScreenEditor(QWidget):
#self.topPanel.layout().addStretch(1)
# Spell checking
self.btnSpellCheck = QPushButton()
self.btnSpellCheck = QPushButton(self)
self.btnSpellCheck.setFlat(True)
self.btnSpellCheck.setIcon(QIcon.fromTheme("tools-check-spelling"))
self.btnSpellCheck.setCheckable(True)

View file

@ -26,7 +26,7 @@ class outlineBasics(QAbstractItemView):
sel = self.getSelection()
clipboard = qApp.clipboard()
self.menu = QMenu()
self.menu = QMenu(self)
# Add / remove items
self.actAddFolder = QAction(QIcon.fromTheme("folder-new"), qApp.translate("outlineBasics", "New Folder"), self.menu)
@ -150,7 +150,6 @@ class outlineBasics(QAbstractItemView):
if _type == "text":
_type = self.model()._defaultTextType
print(_type)
item = outlineItem(title=qApp.translate("outlineBasics", "New"), _type=_type)
self.model().appendItem(item, parent)

View file

@ -367,6 +367,11 @@ class textEditView(QTextEdit):
# FORMATTING
###############################################################################
def focusOutEvent(self, event):
"Submit changes just before focusing out."
QTextEdit.focusOutEvent(self, event)
self.submit()
def focusInEvent(self, event):
"Finds textFormatter and attach them to that view."
QTextEdit.focusInEvent(self, event)
@ -381,4 +386,5 @@ class textEditView(QTextEdit):
tF.setTextEdit(self)
def applyFormat(self, _format):
#FIXME
print(_format)