TED and Qt5

Monkey Forums/Monkey Programming/TED and Qt5

AdamRedwoods(Posted 2013) [#1]
I don't suppose someone can compile TED with Qt5 so I can use it with my Wacom tablet? They removed pen support in Qt5, so I can finally use the darn thing.

If you don't have Qt5, then no worries (it's about 800MB download).


DruggedBunny(Posted 2013) [#2]
I've been trying to get it to build, fixing as many errors as I can, and have got it down to one line in Ted/std.h that just won't build!

void replaceTabWidgetWidget( QTabWidget *tabWidget,int index,QWidget *widget );


The error output is:

In file included from mainwindow.h:12:0,
                 from main.cpp:2:
std.h:51:30: error: variable or field 'replaceTabWidgetWidget' declared void
std.h:51:30: error: 'QTabWidget' was not declared in this scope
std.h:51:42: error: 'tabWidget' was not declared in this scope
std.h:51:52: error: expected primary-expression before 'int'
std.h:51:70: error: expected primary-expression before '*' token
std.h:51:71: error: 'widget' was not declared in this scope


The replaceTabWidgetWidget function is defined in Ted/std.cpp:

void replaceTabWidgetWidget( QTabWidget *tabWidget,int index,QWidget *widget ){
    int curr=tabWidget->currentIndex();
    QIcon icon=tabWidget->tabIcon( index );
    QString text=tabWidget->tabText( index );
    tabWidget->removeTab( index );
    tabWidget->insertTab( index,widget,icon,text );
    tabWidget->setCurrentIndex( curr );
    return;
}


Anyone have any suggestions as to what's wrong here? Not handy enough with C/C++ to decipher this one!


DruggedBunny(Posted 2013) [#3]
Hmm, even after getting rid of that, it gets through a good chunk of the build process before spewing up a bunch of other errors in process.cpp that are a bit out of my league.

Need a real C++ programmer for this! If anyone else wants to have a go, I can post what I had to do to get this far, at least...


AdamRedwoods(Posted 2013) [#4]
cool, thanks for trying.


marksibly(Posted 2013) [#5]
I've got Ted building with QT5, but I'm reluctant to make this the default/release version just yet as it's doing slightly weird things, esp. on the Mac. Haven't tried Linux yet.

Anyway, here's a Windows build (I assume that's what you'r after?) - just copy the 'bin' stuff here to your Monkey 'bin' dir:

http://www.monkeycoder.co.nz/tmp/ted_qt5.zip

Does it fix the Wacom problem?

I didn't have any problems with process.cpp, although I did use the msvc2010 version of Qt5 - perhaps try that?


AdamRedwoods(Posted 2013) [#6]
Anyway, here's a Windows build (I assume that's what you'r after?) - just copy the 'bin' stuff here to your Monkey 'bin' dir:

Ted didn't work, died silently. (Win7x64, ATI 5450, Q6600intel.)
I appreciate the effort, though.


DruggedBunny(Posted 2013) [#7]
Yep, same here!


marksibly(Posted 2013) [#8]
James, what errors are you getting trying to compile?

Are you using the vc2010 version of Qt5 (ie: not the mingw one)?


AdamRedwoods(Posted 2013) [#9]
Ok, so i dove in and managed to compile Ted for Qt5, but only for debug mode.
And yes, this fixes the Wacom problem!!! wow. it's been years.

Anyways, for the release version, I'm getting link errors:
link /NOLOGO /DYNAMICBASE /NXCOMPAT /INCREMENTAL:NO /SUBSYSTEM:WINDOWS "/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" /MANIFEST /MANIFESTFILE:..\..\bin\Ted.exe.embed.manifest /OUT:..\..\bin\Ted.exe @C:\Users\unicron\AppData\Local\Temp\Ted.exe.6164.17550.jom
main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall QApplication::~QApplication(void)" (__imp_??1QApplication@@UAE@XZ) referenced in function _main


EDIT: got it. had to delete old make files.


AdamRedwoods(Posted 2013) [#10]
Here it is for download, if anyone wants (non) tablet support!
http://twopisoftware.com/monkeycoder/ted/ted_qt5_win7.zip

...I see now in Ted there's no line numbers, and the keyword highlighting is not external, so I may mod it at some point.


DruggedBunny(Posted 2013) [#11]
Your build also exits silently exit for me, Adam -- as with Mark's, it exits so quickly it doesn't even register in Task Manager! (I'm running from /bin within a copy of the Monkey folder, via Monkey.exe -- tried straight Ted.exe too.)

Mark, I built with the MinGW version -- will try VC2010.


AdamRedwoods(Posted 2013) [#12]
Really? Now that's odd...

Found this report...
http://www.qtcentre.org/threads/51433-Qt-5-0-0-beta1-application-deployment-problem


DruggedBunny(Posted 2013) [#13]
Hmm, after tracking down and installing qwindows/qwindowsd.dll in various locations (system32/syswow64/Monkeybin) I still get no joy!

The SysInternals 'Depends' tool highlights some missing DLLs/functions that seem to belong to Windows 8, but I'm not sure if that's the cause (as in perhaps they're not required and it's just saying they're not available).

After installing the QT5 VC SDK, it seems I'm just too stupid to figure out how to build Ted in VC2010 -- it's so much easier in the command line!


AdamRedwoods(Posted 2013) [#14]
anyone figure this out yet?
i've added in a few features to ted and wanted to share (LINE NUMBERS!), but still need to figure out why the qt5+vc2010 dies silently.


slenkar(Posted 2013) [#15]
YO adam put in CTRL-SHIFT F for find in files plz
and TAB-ARROW to go left or right through the tabs


marksibly(Posted 2013) [#16]
Try the zip I linked to above again.


AdamRedwoods(Posted 2013) [#17]
works here on the wife's test laptop.
it also works with my mod. so was it just the qminimal/qwindows files?

EDIT: ahhhh.....
http://stackoverflow.com/questions/14144075/application-deployed-with-qt5-libraries-does-not-start-on-windows-7


AdamRedwoods(Posted 2013) [#18]
works here on the wife's test laptop.
it also works with my mod. so was it just the qminimal/qwindows files?

EDIT: ahhhh.....
http://stackoverflow.com/questions/14144075/application-deployed-with-qt5-libraries-does-not-start-on-windows-7


DruggedBunny(Posted 2013) [#19]
That new version works fine here, Mark.


AdamRedwoods(Posted 2013) [#20]
YO adam put in CTRL-SHIFT F for find in files plz
and TAB-ARROW to go left or right through the tabs

Done. Oh, you can already control-tab, control-shift-tab through the tabs, so I didn't modify that.

I'm also fixing up the code tree a little. Any other small requests?


AdamRedwoods(Posted 2013) [#21]
Ok, here is my Ted mod:
http://www.twopisoftware.com/monkeycoder/ted/tedmod_qt5.zip

Note: you will have to delete/rename your old .ini file

added:
- line numbers
- better code tree
- option for opening last session files
- shortcut for FindInFiles

thinking about adding:
- block Rem
- change bg color for app


MikeHart(Posted 2013) [#22]
Did someone manage to create a running version of ted on osx when they compile it themself? I can compile it in 4 and 5 but soon after they start, both versions crash.

What is the damn secret to this. Gosh i know why i hate anything c/c++ related.


samowitsch(Posted 2013) [#23]
I can compile and run Ted for mac with the latest Qt 5.0.1 SDK, but i don't know anything about Qt5 ;o(

I hope the features from AdamRewoods will find their way into the original version of ted or we see a branch of Ted in Github.

The feature that i am missing most is code formatting like it works in Netbeans or Webstorm.


MikeHart(Posted 2013) [#24]
Mmmh, I ment 5.0.1. How do you do it?
My version always crashes. I open the project inside QT Creator and press build. After that I can see that the executable inside the TED app has a new time stamp. I run ted but it crashes. I am sure that I missing a crucial step but which one?


samowitsch(Posted 2013) [#25]
I dont know if i am doing all things right, but when i copy the compiled version into the monkey bin folder it seems to work.

There is also a huge different in file size between the compiled and original version, because the Qt libraries are not included in the compiled app package folder.


marksibly(Posted 2013) [#26]
> Did someone manage to create a running version of ted on osx when they compile it themself? I can compile it in 4 and 5 but soon after they start, both versions crash.

Try deleting the 'bin/Ted.app' folder before building - the release version of Ted includes JUST the Qt frameworks it needs, which somehow conflict with the installed Qt frameworks when you run it from within QtCreator.

Still haven't figured out what frameworks the Qt5 osx version needs, but it's likely to be a LOT. The overhead for dlls on the PC for Qt5 with WebView is 30Meg+.


MikeHart(Posted 2013) [#27]
Ok, will try this.


MikeHart(Posted 2013) [#28]
That did the trick. Thanks Mark.


samowitsch(Posted 2013) [#29]
Ok, here is my Ted mod:
http://www.twopisoftware.com/monkeycoder/ted/tedmod_qt5.zip

Note: you will have to delete/rename your old .ini file

added:
- line numbers
- better code tree
- option for opening last session files
- shortcut for FindInFiles

thinking about adding:
- block Rem
- change bg color for app


I hope this changes find its way into the main monkey build ;-)