Qtilities with Qt Designer

39 views
Skip to first unread message

M. Bashir Al-Noimi

unread,
Jun 27, 2013, 12:08:57 PM6/27/13
to qtil...@googlegroups.com
Howdy,

Usually I use Qt Designer for crearing and managing all the actions of the application but after reading "basic example" it felt that Qtilities didn't ease the process (it make complicated it!). So may you please convert basic example to Qt Designer based to be able to understand how I can use Qtilities practically with real Qt GUI based application?

P.S. Creating all GUI compoents from scrach as mentioned in all your exmple makes Qt hard to deal with it.

--
Best Regards
Muhammad Bashir Al-Noimi

Jaco Naude

unread,
Jun 28, 2013, 5:28:47 AM6/28/13
to qtil...@googlegroups.com
Hi Muhammad

Using Qt Designer to manage actions is fine for small applications. However for big applications the way Qtilities does it is a better approach to follow although its a bit more complicated. The action manager allows actions and shortcuts to be linked with contexts and to change their behaviour depending on the active contexts. This means that you can have a "Shortcuts Editor" in your application's settings page which allows the user to assign shortcuts for common actions. The shortcut will then trigger the backend action linked with the active context. For example, if you have two text editors open next to each other and the left one has the focus, Qtilities will set it as the active context and something like Ctrl+F will trigger a find on the left editor. However, when the right editor has focus, the Ctrl+F action will trigger on the right editor. So, yes Qtilities makes it a bit more complicated but it adds lots of functionality that is required in big applications. If you dig into the sources of Qt Creator your will notice that they use an action management system very similar to the one found in Qtilities.

With that said, you don't need to use the action manager, you can just use the other parts of Qtilities that you would like to use.

Lastly, creating all GUI components in code as done in the examples allows me to show exactly what I do in the example code, without the reader needing to open a UI file to see some part of the example. Also, in many cases I think it makes sense to construct GUIs in code, rather than *always* depending on Qt Designer. I think many experienced Qt developers out there will agree with me on this.

I would strongly recommend that you download a program I wrote called Scineric Workspace (follow the Downloads link at the top). Its a big 100 000+ lines application developed using Qtilities. It uses almost every class found in Qtilities. Unfortunately its closed sourced as it belongs to my employer, but at least you can see what is possible using Qtilities. After you installed it, you can open an example under "Examples and Templates" on the Welcome page to explore it a bit.

As I said before, you really can use only the parts of Qtilities that you need. So if you choose to continue to use Qt Designer for your action management, you can still use the rest of Qtilities or specific classes that you might need etc.

Hope this helps, 
Cheers
Jaco






--
--
To post to this group, send email to qtil...@googlegroups.com
To unsubscribe from this group, send email to
qtilities+...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/qtilities?hl=en?hl=en
 
---
You received this message because you are subscribed to the Google Groups "Qtilities" group.
To unsubscribe from this group and stop receiving emails from it, send an email to qtilities+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Reply all
Reply to author
Forward
0 new messages