Is it possible to make an object on a slide hyperlink to different slides depending on the contents of a textbox on the slide in question?
Per Steve Rindsberg:
Yes, it's possible using VBA. Otherwise, no.
Related
I have custom model with different data types like string (file path) or double which should be edited using combobox with a few items.
It is not clear for me why delegates should be applied to views and not to models...
So, should I pass some kind of flag from my model and then use different delegates for those items according to those flags?
What is the best practice to make it?
EDIT: I'll try to clarify my question:
I have model with the map (key - value (structure that can contain different types like QVariant)) and it's necessary to set different delegates for each row of my, say, QTableView.
What is the best way to pass some "flag" for every item from my model and then handle this flag to set appropriate delegate for the given row?
EDIT2:
This model-view pair is for storage and editing software options with different types.
From the docs:
Unlike the Model-View-Controller pattern, the model/view design does not include a completely separate component for managing interaction with the user.
Delegates are supposed to tackle the "how" in "how should users interact with my data" (that's why I highlighted "interaction").
For your case, that very "double" field you provided, depending on it's interpretation, we could use a line edit (eg exact toleration), spinbox, or even some sort of color select (interpret the value as a color). Even more, one could use a line edit with some sort of color scale for the widget to make it more clear what consequence that value may have.
Correct way? They're tools, not one better than other but rather "one to tackle a specific problem". Can't tell what's the correct way from the info provided.
I suggest re-asking the question with much more info if you still have doubts.
Currently working in SC7 where I have implemented a kind of scaffolding so that editors can add an article to a page and add sections and paragraphs under it. You get the idea, html5 stuff...
Now, the problem...
Editors are working in Page Editor:
Suppose you make a new page, and add an article. It has a title, hero image on top and an introduction. You choose to create new content and I save it in an ItemBucket called ContenStore where I store all my articles, sections, paragraphs... The SC7 way to use the search if they want to re-use any of that content.
Suppose my editor creates another new page, and he wants to re-use a section from the content store. He will find the section but when he has placed it on the page, non of the paragraphs that were on the original section show up... Of course not, since I guess the layout details are saved on the context item level and not on that section level...
Has anyone tackled this problem before? A sublayout (or rendering) should be able to remeber what layout details it has, so that if you re-use it, all the items it had originally are put in its placeholders again as well, and this recursively of course...
Any thoughts welcome...
Erwin
The problem you describe is not new to Sitecore 7. You would have the same problem in Sitecore 6, you would just have to go through the additional effort of keeping your content organized. This is a fundamental limitation of Sitecore's presentation framework.
I have worked around similar problems before by using Presentation Inversion of Control. (I should probably write an update for that since the rules engine approach no longer works)
I believe that Cognifide is doing something similar with the "Composites" in their Zen Garden, but instead of using a dummy layout they use an empty layout so any item can be opened as a page. Then they added a custom experience button which navigates to that non-page content item within the page editor. (Note that this is speculation based on a brief demo that I saw).
Thomas Eldblom also blogged years ago about what he called Composite Layouts. It's similar to PIoC, but puts the presentation settings on a special rendering type.
In short, there are ways to achieve what you want, but they all involve custom development and will require extra attention to maintain a smooth page editor experience.
Often on web pages, there are whole areas that contain content that can be reduced to only the title. Is there a way to achieve the same with a QWidget?
For a very simple example of this functionality, see the screenshots here. Of course, the contents should be any QLayout, and thus arbitrary.
You can use the QToolBox widget:
Im writing a tool that simulates Turing machines.
Here, Ive got a transition table of a such a machine
When a cell is double-clicked, a little dialog pops up (which is a custom widget, derived from QFrame) and should allow editing the contens of a cell. A cell may contain several rules (those |q2, 3, R| and such) and I want that little dialog to show these. The thing is that a user should be able to add and remove rules. At first, I wanted to use QLabels for that, which is fine with the adding aspect, but how do I remove existing rules? I planned having the user select the rules and click "Remove" but do I make sure the entire rule (QLabel) is selected?
Or should I take a completely ddifferennt approach to removing? Like letting every label have an own checkbox?
I would like to keep it as simple as possible. For example, QTableWidget is too "fat" for this, I feel like
You should use a QListWidget - this will allow multiple lines, multiple selection, without the cells or horizontal/vertical headers.
http://qt-project.org/doc/qt-4.8/qlistwidget.html
Very quick question here. I was wondering if it is possible for me to reference individual tabs from a QTabWidget by number. This will save me a lot of time, as I am generating an unknown number of tabs during run-time. I could not find anything in the QT documentation, but I feel like this is a very basic feature that should be included. I am thinking something like this (not real code just an idea, I realize tabNumber() doesn't exist):
ui->tabArea->tabNumber(12);
If there isn't a public function, perhaps there's some other way? Please don't suggest referencing tabs by name because that is out of the question (potentially 100's of tabs), and I have already tried it.
If you want the tab with a certain index, use widget():
QWidget* tab = tabWidget->widget( index );
I think the setCurrentIndex() method is what you are looking for.