View Single Post
Old 02-27-2015, 04:42 AM   #88
bmix
Member
bmix began at the beginning.
 
Posts: 19
Karma: 10
Join Date: Mar 2014
Location: Budapest/Hungary
Device: Kindle4,reMarkable2,MoonReader Pro
Quote:
Originally Posted by Doitsu View Post
Unfortunately, it's not possible to programmatically determine the the .html file currently opened in the Code View window
May I assume, that this is a limitation by the plugin API and not the underlying framework? It should be possible to query the tab-title (which holds the filename) in Qt5, no? I am not versed in Qt development (or C++), but, on the run, I found this at http://doc.qt.io/qt-5/qtabwidget.html:

QString QTabWidget::tabText(int index) const
Returns the label text for the tab on the page at position index.
See also setTabText().

and

currentIndex : int
This property holds the index position of the current tab page.

That would allow to query the currently opened tab's filename and compose a full filespec from it.
bmix is offline   Reply With Quote