Where do i get more widgets for qtcreator? - linux

In qtcreator, when i highlight the qml file, i can select the design tab. How do i add more qt widgets to it?
I've installed qml-module-qtquick-controls from the repos and any qml-module-* named packages that i can, but in the qml types of qtcreator, no extra qml types appear in the pane. I was looking for widgets like buttons, etc but nothing seems to work
What should i install from the repo to get buttons that i can drag and drop into the form editor? I base this on having seen pictures of others having a paneful of widgets. On the other hand when i click on a *.ui file, the design tab reveals a different editor with all kinds of widgets. What is the difference between a *.qml file and a *.ui file?

first question : "getting more controls in QML file"
when you are in Design mode you have three tabs on top:
QML Types, Resources and Imports.
The last one is what you need. Click on the button with "Add Import" and a list with all possible qml imports is shown.
fi. choosing QtQuick.Controls 2.13 will add buttons, check boxes, radio buttons and others...which you will see now on tab "QML Types"
second question:"What is the difference between a *.qml file and a *.ui file?"
qml files are meant to be used in Qt Quick applications and ui. files for Widget based applications. You will find the basic introduction to them in the Qt Creator manual topic "Designing User Interfaces"

Related

Is there a way to change some "special" GUI colors in eclipse?

I have on Linux/KDE a installed version of eclipse Mars.2. But there are strong problems with colors. So there is no different between a activated toolbar button and a inactive toolbar button. At example the "Link with editor" button of the "Project Explorer" view has exactly the same background color if the button is selected or not:
Another thing is that I cannot see if a checkbox or radio button is selected or not. It seems that the foreground color for the check/radio box selections is also identical to the background color. So there is in many configuration views no way to find out what's currently selected and wath's not. In the next screenshot at least one of the "Open mode" radio button must be selected (I assume it's "Double click" button):
Note also that the colors are only in eclipse wrong. In other (native) KDE applications I don't have these effects (at example the foreground of check boxes/radio buttons are black - like I have it expected). Also play around with the color settings in KDE "Application Appearance" has no effects ...
How can I change the colors of these stuff?
There is an Eclipse plugin that helps you import downloaded themes from the online marketplace (themes are free).
This is where you can find it: http://eclipsecolorthemes.org/
You may choose whatever eclipse theme fits your needs!
Good luch!
Ok. Found the solution for my problem on following site:
http://www.jroller.com/andyl/entry/mars_on_linux
Mars is the first eclipse version which uses GTK3 (instead of GTK2 like eclipse versions before 4.5). And on the side above Andrey Loskutov wrotes that may be also the GTK theme (widget style) can be also the problem. The Widget style "oxygen-gtk" should be extremly buggy! After changing the widget style (to now "Adwaida") the problems are gone :-)
You can change the Widget style in KDE by opening in the KDE settings: "Application Appearance" and "GTK+ Appearance".

Can I create a slide show with Balsamiq?

I'd like to simulate navigation and basic functionality using Balsamiq to simulate an iOS app.
I created a series of Balasmiq layouts and I'd like to connect these into an interactive slide show, wherein the individual buttons within each layout connects to a different screen.
Is this possible or do I have to use another tool like Flash?
Balsamiq will allow you to link elements to each other. When you select an object the properties window has a "Link" dropdown and you can link to any other wireframe file in the same directory as the one you are working on. This then puts an arrow next to the control you are working with so that if you Alt+click that arrow you go to the linked form. If you export the entire directory as a PDF you will have a presentation that will work seamlessly with all links being functional.
Here is the tutorial for linking:
Balsamiq linking tutorial

How to skin MFC main menu

I got a menu in an existing MFC application that has a standard MFC main menu.
But I would like to change its background colour so that it appears to more seamlessly belong to the rest of the application.
First picture: An MFC main menu. The application is skinned blue, as seen in the toolbar, but the menu is still standard grey background colour.
Second Picture: Spotify's menu, skinned to fit into the rest of the
colors.
I have not found any examples on anything similar. Could you please point me towards how to achieve this?
Approaches I thought of:
Subclassing CMenu to my own SkinnedMenu, but it is not created by our code but by a GetMenu() call in a mainframe class deriving from CFrameWnd. The only thing I can find here is its method signature, defined in afxwin.h so then how could I make use my own subclassed menu?
Removing the entire menu and add my own custom menu buttons, in a row, making it look like a menu. Maybe this is what spotify have done, as they have also removed the Windows window frame.
Editing the existing CMenu in some way, but the only customization I am able to find right now is modifying its MENUINFO. For example if I set info.hbrBack = skin.GetSysColorBrush(COLOR_MENU) the only colour that changes is the background of the dropdown, not the main menu itself.
Other :)

QToolBar: Is there a way to add QAction to a QToolBar in QtDesigner?

I've a PyQt4 Installed on Python 2.6. I wish to insert actions or widgets into a toolbar in QtDesigner instead of adding them in code, with addAction or addWidget (as simple as adding actions to a menu in design time).
You can add actions by dragging them to your tool bar from the "Action editor" dock window. You cannot add widgets to the tool bar in Qt Designer, I'm afraid you'll have to do this from your code.
You can create your own widget plugins with new or extended functionalities.
Just follow the definition rules from the documentation .
I use a lot of custom widgets inside the Qt Designer.
Once you have figured out, how it works, it becomes a really power full method for your design work flow inside Qt Designer.

Nautilus file explorer and GtkIconView

In order to learn GTK programming, I am building a simple GTK application that reads files in a directory and displays them as icons. I am trying to build something like the Nautilus icon view file explorer. I know the right pane uses GTK IconView but what does the left pane use to display list of places?
Also I have looked at the Nautilus source code but find it pretty complex for me, can anybody give me a simple example of using GTK IconView in C++?
thanks.
I'm guessing that the left pane uses the following:
Places - gtk.TreeView
Information - Custom layout made up of gtk.Image and gtk.Label widgets
Tree - gtk.TreeView
History - gtk.TreeView
Notes - gtk.TextView
Emblems - gtk.Layout with gtk.Image widgets positioned on it
As for the Nautilus window, I've heard that when showing in Icon View and Compact View modes, it uses a custom surface as the gtk.IconView was not deemed good enough. The List View mode most likely uses a gtk.TreeView.

Resources