Why i can't change color of QString?
-
Exact same answer.
There's a section in the readme that explains how to use the library: https://vsronin.github.io/QtModelUtilities/md__i_n_s_t_a_l_l.html -
Exact same answer.
There's a section in the readme that explains how to use the library: https://vsronin.github.io/QtModelUtilities/md__i_n_s_t_a_l_l.html -
You have to manually click on build-> rerun qmake every time you change something in the .pro file
-
yep!
AllDEFINES += MODELUTILITIES_STATICdoes is transformingMODELUTILITIES_EXPORTinto an empty string. if that doesn't work then just manually do a find and replace -
Actually, it probably just easier to replace the entire
modelutilities_global.hwith#ifndef modelutilities_global_h__ #define modelutilities_global_h__ #define MODELUTILITIES_EXPORT #endif // modelutilities_global_h__ -
@SGaist said in Why i can't change color of QString?:
Did you build @VRonin library statically ?

@SGaist said in Why i can't change color of QString?:
Do you mean the symbol missing error ?

I tried multiple times: Build>Clean all>Run qmake>Rebuild all.
-
Do you have a .dll file matching that library ?
-
The .dll if you have built @VRonin's library.
Otherwise, how did you integrate it in your application ?
-
@SGaist said in Why i can't change color of QString?:
Otherwise, how did you integrate it in your application ?
Just included rolemaskproxymodel.h and start using that stuff what he showed in example
-
@SGaist said in Why i can't change color of QString?:
Otherwise, how did you integrate it in your application ?
Just included rolemaskproxymodel.h and start using that stuff what he showed in example
@Engelard said in Why i can't change color of QString?:
Just included rolemaskproxymodel.h and start using that stuff what he showed in example
@VRonin said in Why i can't change color of QString?:
There's a section in the readme that explains how to use the library: https://github.com/VSRonin/QtModelUtilities/tree/dev#installation
And it states:
if you use
qmake(Qt Creator), you can include the entire source of the library directly in your code by addinginclude(path/to/source/modelutilities.pri)in your.profile. -
@Engelard said in Why i can't change color of QString?:
Just included rolemaskproxymodel.h and start using that stuff what he showed in example
@VRonin said in Why i can't change color of QString?:
There's a section in the readme that explains how to use the library: https://github.com/VSRonin/QtModelUtilities/tree/dev#installation
And it states:
if you use
qmake(Qt Creator), you can include the entire source of the library directly in your code by addinginclude(path/to/source/modelutilities.pri)in your.profile.@VRonin Done. It compiles. But it seems like proxyModel eventually empty. tempBx - is pointer to existed ComboBox:
QStringListModel *tempStrMod = new QStringListModel(personalList); RoleMaskProxyModel proxyModel; proxyModel.setSourceModel(tempStrMod); tempBx->setModel(&proxyModel);But if i'd change ->setModel to tempStrMod it works.
-
You are creating the proxy model on the stack. it is most likely going out of scope.
QStringListModel *tempStrMod = new QStringListModel(personalList); RoleMaskProxyModel* proxyModel =new RoleMaskProxyModel(personalList); proxyModel->setSourceModel(tempStrMod); tempBx->setModel(proxyModel);