Unsolved Why i can't change color of QString?
-
@VRonin ye, first time tried to use someone elses code :D
Now i downloaded whole stuff like a normal person. Look at my post with screenshot above. -
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 -
@VRonin I added that macro to .pro file and nothing changed, same 4 errors.
-
You have to manually click on build-> rerun qmake every time you change something in the .pro file
-
@VRonin of course i did that. Still same 4 errors
-
let's do it manually then: remove all the
MODELUTILITIES_EXPORT
-
@VRonin said in Why i can't change color of QString?:
MODELUTILITIES_EXPORT
How? you mean edit your src files?
-
yep!
AllDEFINES += MODELUTILITIES_STATIC
does is transformingMODELUTILITIES_EXPORT
into an empty string. if that doesn't work then just manually do a find and replace -
@VRonin oKay. In what files that stuff which i should to replace? I only can assume that such stuff MODELUTILITIES_EXPORT is macro, so it must be in some .h files, right?
-
Actually, it probably just easier to replace the entire
modelutilities_global.h
with#ifndef modelutilities_global_h__ #define modelutilities_global_h__ #define MODELUTILITIES_EXPORT #endif // modelutilities_global_h__
-
@VRonin Done. But still that four errors(
-
-
@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 ?
-
@SGaist What .dll? I just downloaded src folder, did'nt saw any dll in there
-
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
-
@Engelard
Also the .cpp files , i hope ? -
@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.pro
file. -
@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.