跳到內容
  • 143k 主題
    719k 貼文
    lincolnL
    Well, here's the following, apply the fusion style in my app, and unlock the options in my compbobox if they are disproportionate in vertical format, when you click on the same, my preset options are: It is possible to change the appearance of the coombo box, so that it appears that it is true without applying the fusion style. #pragma once #include <QMap> namespace SW { enum OpenMode{ NEW, EDIT }; enum FormMode{ CLIENT, DRIVER, PROVIDER }; enum Services{ PRODUCT, SERVICE }; enum DocumentType{ FACTURA, BOLETA, N_CREDITO, N_DEBITO, G_REMISION, BAJAS }; struct Helper { explicit Helper() = delete; static const QMap<QString, QString>& getUnits() { return units_;} private: inline static const QMap<QString, QString>units_{ {"4A", "BOBINAS 4A"}, {"BJ", "BALDE BJ"}, {"BLL", "BARRILES BLL"}, {"BG", "BOLSA BG"}, {"BO", "BOTELLAS BO"}, {"BX", "CAJAS"}, {"CT", "CARTONES CT"}, {"CMK", "CENTIMETRO CUADRADO CMK"}, {"CMQ", "CENTIMETRO CUBICO CMQ"}, {"CMT", "CENTIMETRO LINEAL CMT"}, {"CEN", "CIENTO DE UNIDADES CEN"}, {"CY", "CILINDRO CY"}, {"CJ", "CONOS CJ"}, {"DZN", "DOCENA DZN"}, {"DZP", "DOCENA POR 10**6 DZP"}, {"BE", "FARDO BE"}, {"GLI", "GALON INGLES (4,545956L) GLI"}, {"GRO", "GRUESA GRO"}, {"HLT", "HECTOLITRO HLT"}, {"LEF", "HOJA LEF"}, {"SET", "JUEGO SET"}, {"KGM", "KILOGRAMO KGM"}, {"KTM", "KILOMETRO KTM"}, {"KWH", "KILOVATIO HORA KWH"}, {"KT", "KIT KT"}, {"CA", "LATAS CA"}, {"LBR", "LIBRAS LBR"}, {"LTR", "LITRO LTR"}, {"MWH", "MEGAWATT HORA MWH"}, {"MTR", "METRO MTR"}, {"MTK", "METRO CUADRADO MTK"}, {"MTQ", "METRO CUBICO MTQ"}, {"MGM", "MILIGRAMOS MGM"}, {"MLT", "MILILITRO MLT"}, {"MMT", "MILIMETRO MMT"}, {"MMK", "MILIMETRO CUADRADO MMK"}, {"MMQ", "MILIMETRO CUBICO MMQ"}, {"MIL", "MILLARES MIL"}, {"UM", "MILLON DE UNIDADES UM"}, {"ONZ", "ONZAS ONZ"}, {"PF", "PALETAS PF"}, {"PK", "PAQUETE PK"}, {"PR", "PAR PR"}, {"FOT", "PIES FOT"}, {"FTK", "PIES CUADRADOS FTK"}, {"FTQ", "PIES CUBICOS FTQ"}, {"C62", "PIEZAS C62"}, {"PG", "PLACAS PG"}, {"ST", "PLIEGO ST"}, {"INH", "PULGADAS INH"}, {"RM", "RESMA RM"}, {"DR", "TAMBOR DR"}, {"STN", "TONELADA CORTA STN"}, {"LTN", "TONELADA LARGA LTN"}, {"TNE", "TONELADAS TNE"}, {"TU", "TUBOS TU"}, {"NIU", "UNIDAD (BIENES) NIU"}, {"ZZ", "UNIDAD (SERVICIOS) ZZ"}, {"GLL", "US GALON (3,7843 L) GLL"}, {"YRD", "YARDA YRD"}, {"YDK", "YARDA CUADRADA YDK"}, }; }; } // namespace SW #pragma once #include <QDialog> #include "util/helper.hpp" namespace Ui { class ComprobanteDialog; } class ComprobanteDialog : public QDialog { Q_OBJECT public: explicit ComprobanteDialog(SW::DocumentType docType, QWidget *parent = nullptr); ~ComprobanteDialog(); private: Ui::ComprobanteDialog *ui; void setLabelText(const QString text) const; void loadDataToUnitsCombobox() const; }; #include "comprobantedialog.hpp" #include "ui_comprobantedialog.h" #include "header.hpp" #include "notasframe.hpp" ComprobanteDialog::ComprobanteDialog(SW::DocumentType docType, QWidget *parent) : QDialog(parent), ui(new Ui::ComprobanteDialog) { ui->setupUi(this); setWindowFlags(windowFlags() | Qt::WindowMaximizeButtonHint); loadDataToUnitsCombobox(); if(docType == SW::FACTURA || docType == SW::BOLETA){ Header *header = new Header(this); ui->headerLayout->addWidget(header); (docType == SW::FACTURA) ? setLabelText("Factura") : setLabelText("Boleta"); } if(docType == SW::N_CREDITO || docType == SW::N_DEBITO){ NotasFrame *frame = new NotasFrame(this); ui->headerLayout->addWidget(frame); (docType == SW::N_CREDITO) ? setLabelText("N. Crédito") : setLabelText("N. Débito"); ui->TipoLbl->setText("Motivo:"); ui->vencimientoDe->setVisible(false); ui->vencimientoLbl->setVisible(false); } } ComprobanteDialog::~ComprobanteDialog() { delete ui; } void ComprobanteDialog::setLabelText(const QString text) const{ const auto labelText =QString("<html><head/><body><p><span style=\" font-weight:700;\">%1 N</span>" "<span style=\" font-weight:700;\"><sup>o</sup></span>" "</p><p><br/></p></body></html>").arg(text); ui->label->setText(labelText); } void ComprobanteDialog::loadDataToUnitsCombobox() const{ const auto& units = SW::Helper::getUnits(); for (auto iter = units.cbegin(); iter != units.cend(); ++iter) { ui->unidadesCbo->addItem(iter.value(), iter.key()); } } [image: f6ba01b5-b76c-4a64-8e36-ece0804d97d7.png] If this is the case, it should be recommended that this is the normal way to follow the fusion style.
  • Jobs, project showcases, announcements - anything that isn't directly development
    4k 23k
    4k 主題
    23k 貼文
    V
    Everyone who is trying to cross-compile Qt for Orange Pi 3B can follow this tutorial: https://github.com/vverenich/CrossCompileQtForOpi
  • Everything related to designing and design tools

    129 391
    129 主題
    391 貼文
    J
    In QT Design Studio, Tab Buttons are mostly for navigation within the UI, but each tab doesn’t automatically hide other content. Usually, a StackView or Loader is needed to switch visible content depending on the active tab.
  • Everything related to the QA Tools

    83 223
    83 主題
    223 貼文
    Z
    @JonB Thank you!
  • Everything related to learning Qt.

    389 2k
    389 主題
    2k 貼文
    Lehomar2vinciL
    Hi there, I'm also looking for teammates (here lonely) if I can help about creative ideas, I'll be proud to be with you (GMT +1, Paris Timezone) Dont be shy and feel free to DM me :) (Having the same name on Discord)
  • 2k 主題
    13k 貼文
    SGaistS
    I think it's worth asking on the bug report system to see whether they are too specific.
  • 4k 主題
    18k 貼文
    GrecKoG
    Le [=] n'étant pas nécessaire ici vu qu'il n'y a rien à capturer dans la lambda. connect(obj1, &MyObject::mySignal , this, [](int arg1){ qDebug() << arg1; });
  • This is where all the posts related to the Qt web services go. Including severe sillyness.
    1k 10k
    1k 主題
    10k 貼文
    SGaistS
    Hi, I think you can use https://forum.qt.io/category/5/qt-io-webservices category for this type of question (moved there by the way). Are these in your "unread" section ? Are they marked as you following them ?