-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
qdialoagBox #13
Comments
I think the following is what you want to do? I don't get the buttons, but not sure how they work in Qt. let finestra: ptr QWidget = newQWidget()
finestra.makeLayout: #cosi sembra un layout verticale...
- newQWidget():
- newQHBoxLayout():
- use_object lab1
- use_object sbx1
- newQWidget():
- newQHBoxLayout():
- use_object lab2
- use_object sbx2
- use_object sbx3
- newQDialogButtonBox(newQFlags(Yes)|newQFlags(No), finestra) #<-- ????????? |
So not a mistake in compilation, but I don't see the buttons (not even me) I work on it on a while and I see if I solve, for now thanks! |
I understood the problem !!! I corrected it (only partially .. for testing, in this way ..) as indicated in the following table By putting the correct numbers in Enum the buttons appear! I did the "fork" of your project, if I can (time permitting) I see if I can modify and make a Commit. |
Thank you very much for finding the solution! Your patch is correct, but the issue was in the code that generated the bindings (and so there are many more enums that were not correct), while yours only fixes a single file, so I will not pull it. |
Good evening,
I'm playing a little with Nimqt and I must say it's fun.
But I have a small problem with "qdiaogbox" that I didn't understand very well what to pass. For now I have made so I am attaching my program and if you make me understand the error I will be very happy :) good evening!
import os
import nimqt
import nimqt/[qlabel, qpushbutton, qspinbox, qicon]
import nimqt/[qwidget, qboxlayout, qgridlayout, qdialogbuttonbox]
nimqt.init
let pwmApp = newQApplication(commandLineParams())
let lab1 = newQLabel(Q"Set PWM")
let sbx1 = newQSpinBox()
sbx1.setRange(0,100)
sbx1.setsuffix(Q"%")
let lab2 = newQLabel(Q"Set Time")
let sbx2 = newQSpinBox()
sbx2.setSuffix(Q" Min")
sbx2.setMinimum(0)
let sbx3 = newQSpinBox()
sbx3.setSuffix(Q" Sec")
sbx3.setRange(0, 59)
#let icona = newQIcon(Q"eco.png")
let finestra: ptr QWidget = newQWidget()
finestra.makeLayout: #cosi sembra un layout verticale...
finestra.setWindowTitle(Q"TestPWM")
finestra.setGeometry(160, 140, 300, 100)
finestra.setWindowIcon(icona)
finestra.show()
discard pwmApp.exec()
Thanks for your help by A.Martin
The text was updated successfully, but these errors were encountered: