Hello everybody,
could anyone tell me how to make my own FontDialog? I need to add more UI elements to the dialog and prompt for a couple of more options as well as the standard font selection.
Thanks in advance.
Hello everybody,
could anyone tell me how to make my own FontDialog? I need to add more UI elements to the dialog and prompt for a couple of more options as well as the standard font selection.
Thanks in advance.
You need to make a list of requirements for this dialog. Then make a design for it. When you are done, take a look at any dialog example that comes with Qt (let say examples/dialogs/configdialog) and try to create your desired dialog.
I'm a rebel in the S.D.G.
I know how to make dialogs, using QT designer. But my question is how to do my Font Dialog, which is based on standard QFontDialog. There is input widget Font combo box in QT Designer, but I need also font style, font size and so on. I must use standard Font dialog and on the same dialog I must have some more widgets. How to upgrade Font Dialog?
Create a layout for your new dialog and place QFontDialog as one of its widgets, then add additional UI elements to this layout.
I'm a rebel in the S.D.G.
How exactly to do it?
Since QDialog derives from QWidget you can do
Qt Code:
yourLayout->addWidget(regularFontDialog); yourLayout->addWidget(additionalUiElement1); ... yourLayout->addWidget(additionalUiElement2);To copy to clipboard, switch view to plain text mode
Note: you have to arrange them as you like.
I'm a rebel in the S.D.G.
Bookmarks