You use the "pixmap function" feature of Designer.
BTW. I don't say Designer is perfect. See the posts about UIC and container plugins on my blog.
Always. I almost don't know how to layout widgets manually.
Designer? What is that? Nope, never use it.
Depends and the task. Sometimes yes, sometimes no.
You use the "pixmap function" feature of Designer.
BTW. I don't say Designer is perfect. See the posts about UIC and container plugins on my blog.
I use Designer for QMainWindow and QDialogs. I find it handy to get the layout right, especially when I want to stretch "correctly", whatever that is depending on the dialog. It helps to connect simple signals/slots such as pressing enter in a text edit box to activate the Apply button. It makes it very easy to write code with the automatic slot naming, such as on_QSpinBox_valueChanged(int ID).
The times I write code are when the contents change.. such as a joystick dialog where it loads sliders for each available axis, and buttons for each available button. A library handles most of the work and gives me counts for each.
You probably don't need it - it is a function you can write to generate pixmaps according to a name. You can substitute the default pixmap generation process (based on a filepath) with it.
You wouldn't see the result in (current) Designer. If icons are your only problem, you can write a simple routine that would set the icons in code and layout the gui in Designer.I've been writing most of my interface code by hand since I need to assign icons containing multiple pixmap sizes to QActions , but if it was possible to do in designer I would switch.
Always the designer.
I also avoid using "clever code" which will give trouble to those that are going to be supporting my aps after June of next year. Writing "inspired" code which you can't figure out when you are not so "inspired" is foolish. The maintainers will hate you for it.
Thank you for this discussion. Because of this I have finally took the time to learn using the forms, excelent.
At the possible I use designer. But if I would know , I would use a text editor.
Colombo C. Da Encarnaçao Q.
I started with Qt4, and i started with the designer. I always had problems with the designer-generated UIs, i could not handle them. So i mainly use it now to visualize what i want to do and then hardcode it. One problem with generated widgets i had was that they never adjusted their size to the widget or mainwindow that contained them.
Not often, I use the designer when my gui design is very complex because it makes the gui very easily...........otherwise I prefer coding to design gui..................
Newbie that I am, I generally use the Designer.
But occasionally when I am trying to add new items, it is a real pain to have to break all the layouts, or have Designer turn your dialog into a tangled mess.
In those cases I usually manually insert items into the *.ui file, using an XML editor.
i use designer almost everytime, but in my app i use designer in one form but in the other not..
and there is 1 proj that i cant use designer cause everything is dynamic..
in my kind of job where everything has deadline or timelimit or what ever you want to call that.. designer is very helpful..
I don't bother with signals/slots in them. Because the designer creates ugly naming of the slots. etc. But I use it everything else, but depending on what I need it for.
I don't use QT Designer ever.
I guess I'm just old school and prefer controlling everything in my own code.
I also find QTs syntax for building layouts very intuitive so it's easy for me.
Karl
Honestly, dealing with layouts in qDesigner is bad and waste of time. If they add an anchors property for each visual control, it should become more easy, more comfortable and faster way to develop GUIs.
Honestly, NO! And it seems this is not only my opinion. Have a look at the other thread you started. Qt has one of the most advanced, flexible, easy to use layout systems I've ever seen. Sorry to say that, but anchors suck. You cannot design a good user interface with anchors
Qt's layouts are very simple. And that's what makes them very powerful. Just have a serious look at them, and I'm sure you will find out how you can achieve whatever you want it to be. With anchors, you just cannot...
Damn, in my opinion even Java's layouts are superiour to the anchor approach. And I really scorn most of Java's built-in layouts...
Basically it's a kind of layout where you tell widgets how to align with respect to the window they are in, or other controls in said window. Have a look at Up this topic if you wanna QDesigner with an Anchors property!, anchors are described there.
(By the way, is there an easy way to link to other threads in this forum, other than copying their URL? Or a way to link to specific posts in a thread?)
Oh gawd. Not those "anchors" like in C# WinForms. I hate those. Such a freaking pain to work with.
I totally agree. I guess whoever prefers anchors to Qt's layout system just doesn't understand how layouts work. Or has never designed anything even remotely complex. I have never seen anything that is easier to use or more powerful than Qt's layouts. It just rocks
Bookmarks