Is it possible to create such a layout as the one Total Commander uses for displaying drive buttons in the toolbar? Below is the picture of how it takes 2 rows when not all widgets fit a single row, that's exactly what I need to achieve:
Use the FlowLayout:
http://qt-project.org/doc/qt-5.0/qtwidgets/graphicsview-flowlayout.html
TotalCommander was not made however with QT but with Delphi and (FreePascal lately).
Related
So the unfortunate thing about BC is that it uses tables to contain it's product/catalog grids.
I have my catalog page set to display 4 columns of items. The problem with this is it remains 4 on a mobile device. I tried to add a clear to the catalogueItem and it's having none of it.
Does anyone know how I can make it only display 1 column when using a mobile device?
The page in question is here.
You can turn off tables for your products/catalog grids.
This is the code that is found in the Layouts > OnlineShop > page_contact.html
This is an example:
{tag_productlist, perRow, target, perPage, sort, hideEmptyMessage, listType}
set the last option, listType, to true and it renders as an unordered list, then it is simple to do with whatever grid system you are using.
Example: {tag_productlist,3,,50,,true,true}
I have a report viewer that I am using to export to PDF and Excel. Sometimes some of the data in the tables is longer than a singular line.
When exported to PDF the fields that need more height are automatically given it. Yet when I export to excel it remains in the original height and doesn't grow to display all the data.
I want the cell heights to automatically grow to display all the data on screen. I have set CanGrow to true but this has no effect (apart from working when exporting to PDF).
Has anyone had this problem before and can share a resolution?
Thanks
OK, after not receiving any answers I delved in to this one myself.
It appears that text doesn't wrap in excel when the cell is a number of merged cells together.
So in the report viewer if all text areas and items aren't lined up with one another or if one is twice as long as two others then they will be placed in merged cells to make up for the crossover.
It means that the chances are these isn't a solution to the problem, unless all your text areas are identical in width or you can alter the layout so that those that require wrapping to new lines will only take up a single cell.
I done this by putting everything in a table, and knowing that if I merged any cells then text wrapping would not be possible.
I hope this will help someone out there!
I am trying to create a View with two page displays, one that uses HTML List and another that uses Draggable Table, per the instructions for using the DraggableViews module (http://drupal.org/node/283498). However, whenever I change the format for one of the displays, it also changes for the other. Is it possible? The DraggableViews documentation (and Issues for DraggableViews) imply that it is.
Also, I know that an almost identical question was asked last year for Drupal 6 Drupal: Views, can the displays have different styles for the view? , but no satisfactory answer was given.
So, you have 2 displays. Do this:
1. For the first Display, click on Format.
2. In the Top : 'For' -> choose 'This page' ('This x' where x is what you display)
3. For the second Display do the same.
Basically, for all items in a view, you can choose if it applies for all display or for the current one.
Hope it is clear
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).