mirror of
https://github.com/sqlitebrowser/sqlitebrowser.git
synced 2026-01-20 02:50:46 -06:00
qt5: full qt5 compability
ifdef rest of the code which can't be ported 100% add CMake option USE_QT5 to use qt5 ;) Thanks to stretchtiberius for initial patch
This commit is contained in:
@@ -8,7 +8,11 @@ FilterTableHeader::FilterTableHeader(QTableView* parent) :
|
||||
QHeaderView(Qt::Horizontal, parent)
|
||||
{
|
||||
// Activate the click signals to allow sorting
|
||||
#if QT_VERSION >= 0x050000
|
||||
setSectionsClickable(true);
|
||||
#else
|
||||
setClickable(true);
|
||||
#endif
|
||||
|
||||
// Do some connects: Basically just resize and reposition the input widgets whenever anything changes
|
||||
connect(this, SIGNAL(sectionResized(int,int,int)), this, SLOT(adjustPositions()));
|
||||
|
||||
@@ -80,9 +80,11 @@ int main( int argc, char ** argv )
|
||||
a.setApplicationName("SQLite Database Browser");
|
||||
|
||||
// Set character encoding to UTF8
|
||||
QTextCodec::setCodecForTr(QTextCodec::codecForName("UTF-8"));
|
||||
QTextCodec::setCodecForLocale(QTextCodec::codecForName("UTF-8"));
|
||||
#if QT_VERSION < 0x050000
|
||||
QTextCodec::setCodecForTr(QTextCodec::codecForName("UTF-8"));
|
||||
QTextCodec::setCodecForCStrings(QTextCodec::codecForName("UTF-8"));
|
||||
#endif
|
||||
|
||||
// Enable translation
|
||||
QTranslator translator;
|
||||
|
||||
Reference in New Issue
Block a user