- Posts: 5712
- Thank you received: 0
Entry Dialog
I also see in the ScreenOptions widget there is a EntryDialogSoftkey, I took that as meaning a popup soft keyboard but nothing seems to happen.
Please Log in to join the conversation.
then you can use
QDialog{ background: qradialgradient(cx: 0.3, cy: -0.4,
fx: 0.3, fy: -0.4,
radius: 1.35, stop: 0 #fff, stop: 1 #888);
}
(for all) or say ToolDialog{} for just the tool dialog.
The softkey option requires you to tap the entry widget (set focus) for the pop up keyboard to show.
Please Log in to join the conversation.
Thanks Chris, that will be great.cmorley wrote: I see an error in sceenoptions that make the dialogs standalone rather then objects of the main window. i will correct that soon.
then you can use
QDialog{ background: qradialgradient(cx: 0.3, cy: -0.4,
fx: 0.3, fy: -0.4,
radius: 1.35, stop: 0 #fff, stop: 1 #888);
}
(for all) or say ToolDialog{} for just the tool dialog.
Ahh, now I get it. Is it possible to bring up the soft keys when the entry widget is displayed, is seems a bit unintuitive to me. And of course I am going to ask is the entry widget able to be styled?The softkey option requires you to tap the entry widget (set focus) for the pop up keyboard to show.
Please Log in to join the conversation.
in 2.8 + you can style the dialogs such as:
EntryDialog, ToolDialog FileDialog CalculatorDialog etc
in master you can also style the entry widget's keyboard with something like:
SoftInputWidget is a QDialog and MtFlatPushButtons are QPushButtons - so they can be styled similarly.
Something like this is a start:
This touched a few widgets and hopefully i haven't broken anything.
I might add that anywhere there is an entry dialog, you can change it to a calculator widget if you prefer.
I requires a small line in the handler file.
for instance a axistoolbutton:
self.w.AXISTOOLBUTTON_NAME.dialog_code = 'CALCULATOR'
it defaults to 'ENTRY'
Please Log in to join the conversation.
I am trying to do this work on master with a python3 build. I have tested a bit on 2.8 but am not too concerned with that. I am sure I will have many more questions.
Please Log in to join the conversation.
Please Log in to join the conversation.
Please Log in to join the conversation.
The only thing left to change is the little menu popup when you press an AxisToolButton.
Are there no equivalents to the Gladevcp hal_spinbutton and hal_label.
Do you know if it is possible to have the hal pin names use hyphens instead underscores. I see in Designer that it won't allow hyphens in widget names but if I manually change them in the .ui file they appear to work ok.
EDIT: don't worry too much about the hal pin names, it won't be as much of an issue as I thought it would.
Please Log in to join the conversation.
spinbutton - DoubleScale may be what you are looking for - (no docs added yet)
There is no equivalent to hal_label presently but you can combine some widgets to build it:
Connecting a GeneralHALInput to a standard label using designer's signal/slot selector will give a (boring) label that tracks a HAL pin. using stylesheets can make it look at bit better.
You could of course do a little handler file magic to have more control on a label too.
I will look into this missing widget soon though.
I never noticed the hyphen problem - yes it's a designer restriction on widget names not qtvcp and in fact some widgets have an entry for the HAL name and you can use a hyphen. I'll have to think about whether to change all the widgets to use this (better) way.
Chris
Please Log in to join the conversation.
will show an example of the DoubleScale widgets and show the labels as outputs.
though in this case the labels are showing the output of the DoubleScale rather then a plain HAL pin - but the principle is the same.
Please Log in to join the conversation.
