I have a hebrew locale configured in my computer and for some reason this makes QT designer mirror its entire interface to be aligned from right to left.
This is horrible and makes the designer useless for me.
Is there a way in run-time to make the designer not mirror its GUI elements? a menu item or an environment variable or something?
Did you try to run designer with the option "-reverse", that could solve your problem.
If the locale is "french", and I run with "-reverse" all the layouts become right to left aligned, so maybe if the locale is "hebrew", the layouts will become left to right.
Related
When i add splitters, it acts as a layout, but also allows to resize the widgets in runtime. So, for example, i managed to lay out my widgets in this way:
Therefore, i can resize my widgets in runtime. As i noticed, this function is also available in designer mode, but it doesn't work properly. I tried to hover over my splitter and drag it in designer mode, but it only replaces the entire widget.
That is how does my main window look like in QtDesigner. I haven't tried to code yet. The problem is, that even though i used to set a stretch factor, my widegt's look in designer mode and in runtime completely differ. They have another sizes.
So, what are the problems:
Firstly, i can't change my widgets sizes properly, using stretch factors. I don't know, i tried to change size policies, but i did't manage to see an effect. I have somehow changed size of the vertically oriented widgets, but when speak about horizontal orientation - stretch factor and size policy doesn't change anything at all.
Secondly, i can't move my splitter in designer mode. It's position is constant, by default, it's always somewhere in the middle.
Thirdly, i have bugs (i think so) with my widget sizes in designer mode. They differ with widget's sizes in runtime.
Question:
So, how can i change widget's sizes properly? Maybe there's a way of moving a splitter in designer mode - do newer versions of Qt have it? Currently i'm using Qt 5.9.9. Also, why these bugs, and are they bugs at all. Maybe i just should update my Qt to newer versions to get access to newer functionalities?
Comment: I'm not sure if stretch factors work with layout as they do with widgets. I'm using layouts exactly the same way i use widgets. My layout's wrong(maybe) use may have caused this problem. Anyways, i'm entirely new to Qt, and may not know something to understand it completely.
I use Qt designer (as opposed to building controls via the program) to lay out my sidebar and floating dialogs. When first launching the application, the sidebar is WAY too wide and bears no resemblance to how I saved it. The user can shrink it to a reasonable width, and that is 'remembered' after closing and re-opening the application. But it doesn't create a good first impression of our application, and not all our users are savvy enough to realize that the sidebar width can be changed.
The sidebar is quite complex, with multiple forms (QStackedWidget) and each with multiple controls. Any suggestions for forcing it to come up at the minimum width with the first use? Thanks!
You should be able to achieve the wanted behavior by setting "Horizontal Stretch" property in Qt Designer, for each of the widgets in your splitter or layout, whichever you are using to layout your components. See QSizePolicy documentation for more info.
The "Horizontal Stretch" & "Vertical Stretch" properties are located in Qt Designers Property Editor, under the sizePolicy.See the image for exact location of properties
I'm just trying out QT, and I want to make a "list" containing a menu on the left site of the window, just as it is in the QTCreator. (I made a screenshot of that "list")
I tried some things, editing the design, but i dont have any idea, how to make such a "list".
Vertical customized (using qt style sheets) QToolBar may look and feel pretty same as this one in Qt Creator
It appears that starting with Qt 4.7 the layout direction of all GUI elements is now controlled by the locale. When my locale is a right-to-left one, all menus, dialogs, message boxes etc' appear from right to left. This is horrible.
The default locale in my computer is Hebrew because it is convenient to see dates and numbers in the local format but I most certainly don't want all my GUI to now be Right-To-Left.
Why did they do this all-encompassing change? Is there any way to turn it off globally?
The default look of a Mac wizard (and by extension of QWizard) is this:
All this space on the left, where the bowtie image is, is completely useless and wasted.
Instead I like what the Dropbox guys have done:
How do I achieve this effect in Qt?
(Using PySide wrapper here, but I'll take any code that I can get!)
I tried settings all kinds of paddings and margins and whatnot on QFrame, QWidget, etc. using a stylesheet and still cannot get rid of this space on the left. Do I need to hack MacStyle? How would I go about doing this?
Change the Wizard Style to Classic:
setWizardStyle(QWizard::ClassicStyle);