I am making an application which needs to have a browser inside an application. I was previously going with JavaFX and its WebView.
But since I prefer Chromium, and since Qt can natively run on Linux without installing anything else, I am leaning to use Qt, since it changed its default web engine to Chromium last year.
Anyways there isn't good documentation on how to use it. So it would be great help if anyone who might have experience with it can point me in the right direction.
This will be available no earlier than Qt 5.3, so you need to wait a bit. Qt 5.2 still uses webkit.
Related
I have a project built with Qt 3.2.3. It's a little outdated piece of code, but it works fine except for its' embedded browser. This thing is plain old. So I want to take fresh nightly built WebKit and try to adopt it somehow. The question is - is it even possible? I am new with Qt, but had a little experience with WebKit in the recent past. It was very easy linking it to C# project, but I really don't know about Qt and C++.
Maybe there is some better solution for updating a Qt browser without touching the whole Qt?
Honestly saying I think it's easier to port an application from 3.* to latest 4/5 then compiling latest WebKit into 3.*.. there are some core differences which will be really hard to solve. Although such experiment can be possible but I just not sure it's worth it.
WebKit from SVN won't even build against Qt from a couple months ago, so I can't imagine it would be easy to get it to build against Qt 3. I would highly recommend just porting to the current version of Qt and QtWebKit.
I have tasted both Qt 4.x/5.x and GTKmm 3.x and I really like GTKmm over Qt.
Now I have just discovered that GTKmm 3.x doesn't offer a Windows porting, they also do not offer a Mac porting, basically I can't find nothing but libraries/sources/binaries for Linux.
Apparently the Windows support ( I'm not sure about the situation for the Mac OS stuff ) was dropped in the 2.x era and it's still not-existing today.
I have planned to use GTK 3.x for specific reasons, especially for some new features introduced by the 3.x branch, so using GTK 2.x is an option off the table.
Now I ask: there is something new for the Windows and/or Mac support for GTK 3.x ? There is something ? even experimental projects ?
No it isn't - at least when you want to be on the safe side for the future. The MacOSX and GTK ports are less then perfect and completely voluntarily which means by a program of this complexity and size they are not not active developed. And nobody cares that old features are implemented before new are added.
Almost 2 years since GTK3 released and there is still no official Windows binary distribution. And on one of the GNOME conferences there was an open discussion if GTK4 should be made Linux only. Well i guess they mean Linux/BSD - but Wayland is pure Linux at the moment and BSD do have a lack of developer for Desktop stuff.
This should be enough to scare any person with a serious program which requires real world investment away.
Also i strongly belive that cross platform GUI toolkits are a thing from the past. Abstract the GUI of your app and develop for every platform. With the success of the AppStores you will be forced more and more to use the native platform style. Your app will already be rejected by Apples AppStore if it looks to different. Windows is now enforcing WinRT. Be prepared that this will just be more important in the future.
So the way to go is WxWidgets which uses native widget sets. Skip GTK
2018-12-18 Update:
GTK+ 3 on Windows has been supported through MSYS2 for years.
Old answer:
GTK for Windows is currently provided "as-is". What it means, basically, is that there are no GTK maintainer that use Windows, and those using Linux have enough work maintaining the Linux builds.
This means that any contribution for GTK 3 on Windows is welcome, some people are using it, but that's not ready for the masses because nobody steps up to do the work, which won't be done by magic overnight. So it's usable, but don't expect reactive maintenance.
As for the build, there's a french dude providing an (unofficial) GTK 3 installer for Windows.
As of right now, no.
Like Frédéric Hamidi said, see Where can I download precompiled GTK+ 3 binaries or windows installer? for more info.
GTK on Mac has worked well for a long time and continues to work into the 3.x series:
https://live.gnome.org/GTK%2B/OSX/Building
You can also install GTK 3.x using MacPorts, but I don't know how well that works.
Can anyone help me out, I need a cross platform way to detect if browsers are installed e.g. Is Firefox installed, Is Safari installed etc.
I am using wxWidgets for my GUI libary if this helps.
I can check the registry on windows but am unsure on how find out browsers for Linux and Mac. Would prefer one clean cross platform way rather than several
If(windows)
then search registry
If (Mac)
then do something else
etc.
Thanks
What's wrong with http://docs.wxwidgets.org/2.6.3/wx_miscellany.html#wxlaunchdefaultbrowser?
And why not using several ways of detection? This functionality could then be implemented in wxWidgets itself. After all, wxWidgets does exactly this and just abstracts it away using function with platform specifics hidden behind.
Currently all our GUI components are written in MFC. Our build environment is:
VC 6
Windows XP
I have no idea whether:
1) We can replace all MFC components with Qt, without changing build environment ?
2) Qt will work with VC6 as any other library?
You answers will help me in getting started, In the mean time I have installed Qt 4 and am trying to build some samples.
If we can replace all MFC components with QT, without changing build environment ?
Yes, you even get a MFC/Qt migration framework cf qt.nokia.com/products/appdev/add-on-products/catalog/4/Windows/qtwinmigrate/
Will Qt work with VC6 as any other library ?
VC6 is more than 10 years old!
Qt supports VC6 until version 4.5
The next release (4.6) will drop VC6 support cf qt.nokia.com/doc/4.6-snapshot/qt4-6-intro.html#performance-optimizations
You probably shouldn’t use VC6 with Qt 4.5. (see doc)
Apart from that: If your project compiles with Qt, you can easily* switch to Qt components. Qt uses its own componentens anyway, so there’s no other dependencies involved.
However, to set up the Qt environment, you might need to do a few changes to your build system, unless you’re not working with QObjects. (Think of the moc pre-processor.)
*: easily in the sense of being able to start using Qt components. The amount of work needed to actually migrate MFC components to those of Qt is something I don’t know anything about.
Replacing MFC to QT requires a big work to do. First of all you should think whether you need that. Second, Qt could be integrated with Visual Studio.
I learned something very useful when trying to port one client's MFC application to Qt.
I do a lot of refactoring. That doesn't scare me at all. However, I am usually incrementally changing things. That makes a huge difference.
I started porting the MFC application to Qt just after the LGPL version of Qt was released, but before the LGPL release of 'qtwinmigrate' (get it at ftp://ftp.qt.nokia.com/qt/solutions/lgpl/). At the time, I thought Qt was going to hold on to the MFC migration stuff as an incentive for the commercial license.
I had to convert a good number of files before ever being able to compile the project. Once the very basics were up and running, I slowly re-added dialogs until the functionality matched the original version. This was much harder than being able to keep your existing MFC app running as is and slowly replacing dialogs.
So, the point is... USE QTWINMIGRATE!
Oh yeah... and don't use VC6. Upgrade to something more recent.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
A few months ego I purchased Nokia N800 device and since then I'm itching to write some code for it. I know that some of the application I'm running are written in Python and that there is a Mono port for the Maemo platform as well.
Basically what I'm asking is:
Is there a recommended development language for Maemo platform?
What development tools exist?
Can I use Windows or Linux as my primary development machine, and which do you recommend and why?
I highly suggest that you try C++ and QT.
QT is already well supported for Diablo and Fremantle, and the next release of Maemo (Harmattan) should be based on QT.
Learning QT will be much much easier than GTK+, coding will be faster and more fun, your application can be compiled in various platforms and you can even develop and debug in Windows, then simply run a qmake && make in a scratchbox environment.
Take a look at this tutorial: Getting started wit QT for Maemo
You still need a Linux box to compile your code for a Maemo device.
If you are using windows, you can setup ubuntu (or kubuntu) in a VirtualBox machine.
Maemo SDk + along with Scratchbox 2 is a better alternative than Maemo SDk & Scratchbox.
Personnally, I'm using QT creator in Windows, kubuntu 9.04 in VirtualBox, and I've never been happier.
When I started, I tried the "official" approach : Ubuntu, GTK+, C language and scratchbox 1. ... that was painful.
The Hildon framework is made up of GTK+ extensions, so the language is C. You can use C++ wrappers (maemomm) too. Or you can go with pymaemo for building apps with Python, which to me is much easier than C or C++. I've also seen an attempt at a ruby port, but have not followed up with that project recently.
For the development environment, there is "scratchbox", which gives you a sandbox for compiling and running your app. Here's a link on how to set up a scratchbox development environment. (It sure took me a long time to get everything setup.)
You'll have to use Linux as your development machine because your Nokia N800 is really a mini Linux computer.
If you want to have an IDE experience, try the ESbox plugin for Eclipse.
Have fun hacking!!!
I've just found two tutorials on Maemo.org:
Writing Hildon Desktop Plug-ins for Maemo 3.x
How to write maemo desktop plugins for maemo 4.x
For extra on-the-go fun, you can get the linux gcc and make tools running on the tablet itself and do your programming and compiling on the device.
For any help with this sort of stuff the Maemo Talk forums are fantastic.
Ruby for Maemo is being hosted at http://code.scottishclimbs.com/maemo/
I've not yet tried it myself.
There's a Scratchbox Virtual Appliance for Maemo development (I'm not sure if the link is the right one) but that's how I started hacking. It took forever for me to figure out how to set up scratchbox by myself.
I have to echo Karatchov's response.
The 2 recommended approaches currently are:
Python + PyGtk
C++ & Qt
Using anything else, you set yourself up for some pain (unless you are a Gtk+ veteran - since you are asking this question, I assume you are not). C++ & Qt is the future of Maemo anyway, and Qt works well on "old" platforms such as Diablo.
As a debugger, I recommend you pick up (compile) "cgdb". The plain old gdb can be a bit too spartan.
Generally, you should develop your application as a "normal" Qt application using Qt Creator, and occasionally test it in scratchbox.
Nokia has been working hard to provide tools and documentation for developers. I would say one of the best places to start is at Forum Nokia:
http://www.forum.nokia.com/Technology_Topics/Device_Platforms/Maemo.xhtml
The next stop for developing for Maemo is of course Maemo's headquarters:
http://maemo.org/development/
These two links are to portals where you'll have to drill down for further info, but they are pretty good starting points. Now to answer your questions directly:
I suppose the two 'recommended' languages are C and python. While these are well supported, they are not the only choices as you have seen from previous answers. In addition to those languages, perl is on the device, though it is not in the same state as it is on debian.
The chief development tool is the SDK. It allows you to test the environment and compile software for the device. You can also use Eclipse for which there are plugins.
It is recommended that you use linux as a development machine, but you can run it in a virtual machine on Windows. While I prefer my OS to be 100% free and therefor choose debian, Nokia is working hard to make a better development environment for Windows. So rest assured that Nokia does not necessarily share my bias! :-)
I develop mainly with python and pyside (I develop on an N900).
I have all my files in the nokia N900 and I use sshfs to mount my home directory on my pc.
I then develop on my desktop, while actually saving everything right into the cell phone, and use SSH to run it remotely.
If you get too lazy to even pick up the device to look at the screen, you might want to use VNC; though personally, I feel it's just not responsive enough.
Yes, all I have on my desktop is my editor (sublime-text, by the way). The rest live on the mobile device. I use git to sync things/make backups, etc.
py2deb is great for making packages once you want to distribute your proyect. Again, no need to install anything on your desktop.
IF you'd rather be more conservative, the SDK is designed for debian, and you'll suffer a lot with any non-debian-based OS (unless you use a VM). Be warned! :)