PDA

View Full Version : C++ code and Qt



nigele2
25th January 2012, 17:57
Hi. Just been evaluating Qt and looks really good for GUI development across platforms.

However I had imagined C++ would fully integrate into a Qt GUI. For example I wanted to use fstreams to read and write files when a button was clicked. But all examples seem to show the use of QFile.

Have I missunderstood and is it not possible to drop the hundreds of classes and wadges of code I have (all C++) into Qt GUIs?

Thanks for any help :cool:

wysota
25th January 2012, 18:00
You can use any C++ class you want. There are advantages of using QFile however if your fstream based code works, there is no reason to change it.

nigele2
25th January 2012, 19:23
Many tx wysota. I thought that must be the case and indeed have just got one to work.

The reason I don't want to get unnecessarily hooked into Q stuff is to leave a future escape tunnel. 95% of what I will end up with is already well established and been in use in one form or another for 20 years. And it is all native C++, C, with a little shell script and HTML with Jscript.

As for my evaluation I found a few glitches in Qt on Windows but with Linux it seems really solid. Cheers

wysota
25th January 2012, 21:33
Trust me, if you sink into Qt, you'll never want to use that escape tunnel :)