We've got trouble on promoting widgets. When we try to promote QQuickWidget to our class, we can't see QQuickWidget as base class despite other base classes. However sometimes it appears unless doing nothing special. Do you think this is a bug or is there anything to do to solve this problem ?
0
votes
StackOverflow lets you simply paste pictures straight into the question. Do not use any external sites for images. Simply Ctrl-C from the screenshot editor, and Ctrl-V in a chosen point in the question. Remember: questions and answers here are supposed to remain usable for "the foreseeable future". File hosting sites simply drop content after they get bored of you (I'm serious - those links just stop working after a while, Dropbox doesn't host things for eternity, they'd go bankrupt in an afternoon). SO is I'm sure paying good money for imgur to host their image contents.
- Kuba hasn't forgotten Monica
Our company has a protocol that we can't upload project images to anywhere except dropbox. So sorry for that.
- Monster
That also implies then that you can't ask questions on SO with images, because on SO the use of its image hosting is indeed a requirement. You may wish to consider a job change when possible - they won't get any work done or everyone is breaking this rule. Either way it's a sick environment to be in - I'm sorry you find yourself in such a conundrum. The policy is a failed attempt at "IT security": they believe that they can control inadvertent disclosure that way. Gee whiz, guess what: Internet never forgets. The image you posted? It'll stay with us till the end of time for all I know.
- Kuba hasn't forgotten Monica
1 Answers
1
votes
First of all: do you actually need the Designer to know about the widget being of the QQuickWidget type? You likely don't, so simply promote it directly from QWidget. They are all widgets, after all! The only difference a base class makes it that it exposes the derived-class-specific properties for editing using the Designer Ui - that's literally all. If you specifically need to adjust some properties of a QQuickWidget using the Designer interface, then you can just manually substitute the name inside the .ui file - it's just an XML file, easy to edit and understand.
Specifically:
sed -e 's/QWidget/QQuickWidget/g' < mypromoted.ui > myfinal.ui
That's all it should take, and you can always verify the results in a text editor.
