Editing Delegates

แชร์
ฝัง
  • เผยแพร่เมื่อ 8 ก.ค. 2024
  • In the previous two episodes we looked at Qt's support for rendering items in the model/view framework.
    In this episode we will turn our attention to custom delegates for editing items.
    In the KDAB gift shop we will receive a ready to use delegate for choosing items with a combo box.
    0:00 Introduction
    1:28 Setting up a simple delegate for editing Money values
    6:52 QItemEditorFactory
    11:02 Now I can't edit booleans - time to start t he debugger
    12:50 QWAMItemEditorFactory
    16:34 Unfortunately the concept didn't work out for me
    17:34 QComboBoxDelegate
    19:35 Subclasing QComboBoxDelegate to support custom types
    22:22 Using std::variant
    23:41 Ensure data is committed as soon as I've selected an item in the combo box
    27:37 Outro - a few jokes
    The example code showcased in this video is available here: github.com/KDAB/kdabtv/tree/m...
    All Qt Widgets and more videos:
    • Qt Widgets and more
    About the host:
    The video is presented by Jesper Pedersen, who started with Qt back when Qt was widgets only and the version was 1.44, which gives him 21 years of experience with Qt. Since 2000 he has taught almost 100 Qt classes, ranging from Qt Widgets to QML. Heck, Jesper even taught a few classes on QTopia Core - Trolltech's initial attempt at creating a phone stack. Today Jesper holds a fancy business title, but that doesn't prevent him from coding both in his job and in his spare time.
    Every month our newsletter is featuring technical blogs on Qt, C++ and 3D topics: www.kdab.com/development-reso...
    About KDAB:
    KDAB offers experienced software experts to help you deliver functional, high-performing and innovative software across embedded, mobile and desktop platforms for projects using C++, Qt, QML/Qt Quick, OpenGL, Qt 3D and more. www.kdab.com/software-services
    KDAB experts regularly take time out to deliver KDAB’s world class training, in-house or at open enrolment courses around the world. We are the market leaders for training in Qt, OpenGL and C++.
    Contact us to find out more at training@kdab.com or visit our website: www.kdab.com/software-service...
    We are about 90 people, located all around the world. Our Head Office is in Sweden and we have other offices in Germany, France, the UK and the USA. www.kdab.com/about/contact/
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น •