Add ``setValidator`` method to widget instances that receive input
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 35/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Stack tecnologico
- javascript, node.js
- Ambito
- desktop
Direzione di ricerca
Start by reading the existing QLineEdit and setInputMask APIs to understand how input-related methods are exposed in NodeGui. Define the setValidator behavior for widgets that accept input, including how the supplied function is evaluated, and verify the resulting API with a representative QLineEdit example.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
It'd be great if widgets that accept user input like QLineEdit instances implemented a setValidator method that accepted a function that prohibits input for which it evaluates to false.
For an example of how this is done in PyQt see here.
In JavaScript nodegui it could look something like this:
const { isFloat } = require("validator"); // i.e. validator from npm
//...
const widthLineEdit = new QLineEdit();
widthLineEdit.setPlaceholderText("0.0");
widthLineEdit.setValidator(isFloat)
//...
In the meantime I'm open to workaround suggestions (
setInputMask, etc.), I've only just started playing around with nodegui, but so far I'm liking it. Please keep it going. Thank you!
- Lingua principale
- C++
- Stelle
- 9.2k
- Fork
- 315
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di nodegui/nodegui
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 30/100
-
Support QTransform Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 35/100
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
-
Is this project dead? Aperta
Difficoltà 5/5 Più di una settimana Idoneità per principianti 15/100
Tutte le issue di nodegui/nodegui
Issue simili
-
[BUG] Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
eunomia-bpf/llvmbpf#51 · 1 commento ·
-
status:needs-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
PX4/PX4-Autopilot#28776 ·
-
Website Doc Typo Aperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 92/100
-
Difficoltà 1/5 1-3 ore Idoneità per principianti 92/100
autowarefoundation/autoware_universe#13413 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100