I'm reading Qt Designer manual. And found following para saying;
"Qt Designer provides a scratch pad feature that allows you to collect
frequently used objects in a separate category. The scratch pad
category can be filled with any widget currently displayed in a form
by dragging them from the form and dropping them onto the widget box.
These widgets can be used in the same way as any other widgets, but
they can also contain child widgets. Open a context menu over a widget
to change its name or remove it from the scratch pad."
I was searched for scratch pad, but nothing found.
Try dragging a widget (it can have nested child widgets in) from the form editor onto the list of stock widgets on the left, it should add the dragged widget into a new subgroup "Scratchpad". The scratch pad will only appear then.
The scratch pad category can be filled with any widget currently
displayed in a form by dragging them from the form and dropping them
onto the widget box.
It is a little ambiguous, but by "widget box" they mean this guy:
Related
Can Qt build menu bars with a widget that allows to write the menu entry to select, and the menu bar tries to guess what the user is looking for providing a list of candidate entries?
I am sure this can be implemented manually, but I am wondering if this is a feature that Qt provides out of the box.
See the image for an example (from Visual Studio 2022).
I have a small problem whit QScrollbar.
for example,
This is a one my project in C#
At left panel, the user loads a graphic image and can pick elements.
but I see in Qt don't exist Split Panel whit automatic Scrollbar.
I tried to use QScrollArea, but if user maximizes Window it's a problem.
anyone have a solution or a good way to make this in qt?
I'm relatively newbie to qt creator doing embedded cpp work. I was wondering if there is a way for the class view side bar to show the active class I'm working on in the editor window? I also tried to do a search using locator "c MyClass" to show MyClass, the locator manages to find MyClass, however when I click it, it opens in editor window, it is tracked in the Project sidebar but it is not tracked in the Class View SideBar. Am I missing any settings?
Qt Creator 3.4.1
Based on Qt 5.4.2
Is there is a way in Qt Creator for the class view side bar to show the active class
I'm working on in the editor window?
Yes, choose Outline in the hierarchy menu on the left. Mind that you can use Split button (find it by hovering over the second from the right top button there) for having more than one type of project hierarchy there.
I am going to write an application that uses QT4 (with C++ or python it isnt important in that moment).
One of functionality is "Showing all items in database".
One item has a Title, author, description and photo (constant size)
And there could be very many items. Let's say 400. There won't be enough space to show'em all at once time.
One row will have 200px, so i need at most 4 for once time.
How to paginate them? I have no idea.
I can use limit and offset in SQL queries, but how to tell window: "that's 5th page"?
Any solutions?
First off, you normally do not want to use any manually set pixel widths in any GUI application, if you do, your toolkit sucks (or you must work in game development).
Second off: be more specific.
You'll need to define "page" for your application, namely what a page should be in its context. I assume it is breaking a list of items into separate pages. Normally this is done by using one of the view classes (e.g. QListView or QTableView) to take care of much of the legwork: it's called a scrollbar (not to mention the collapsing folders concept from file managers). Another method is splitting the information across several tab pages (QTabWidget), where each page displays a view of some sort (Perhaps QTextView or one of the M/V or Item view classes).
Same thing can also be done using your own widget stack and some other widget to manipulate the currently displayed page. This is basically how the option dialogs in the TeamSpeak 3 client and most KDE apps work; it's also how wizards with back/next buttons work in concept. I suggest you take a look at this config dialog example
Normally what you want is a view with a scrollbar and or some form of collapsing related entries into categorised information. If you just want to display a list of pages where each page is X entries: use a tab widget or stacked widget.
How do I switch between the two screens on the Qt?
For example, I have a button - static text plus a toolbar. Now I will add it to a frame and set it as a central widget. It works well for one window. What if I move it to the next window? Then I need to show some other stuff like another button, some images etc... and what if I come back to the first view again?
How do I show my old widgets back?
I'm not sure I got your problem right but, you could have different scenarios :
You could simply use groupboxes... Some widgets in groupbox1, otherWidget in groupbox2, and you display the groupbox you want to use, hiding the others...
You could use stackedWidget, which simulates "pages" of widgets stacked on top of eachothers... more informations here : http://qt.nokia.com/doc/4.6/qstackedwidget.html.
You could use other way like using tabs : http://doc.trolltech.com/4.6/qtabwidget.html
Maybe this example would be useful to you : http://qt.nokia.com/doc/4.6/dialogs-configdialog.html
Hope it helps a bit !
I'd recommend checking out Animation/States example (should be in /qt/examples/animation/states/ subdirectory of your Qt installation). It shows how to combine state machine representing application logic with presentation layer and get cool animation effects for free (of course if you don't need eye candy, you can set widgets properties without any animation).