You can adjust horizontal stretches and/or size policies of widgets.
You can adjust horizontal stretches and/or size policies of widgets.
Well, I used resize function, but there are no results ...![]()
Qt 5.3 Opensource & Creator 3.1.2
Resize won't work as layouts override it. Use what I suggested.
well, if I knew what you thought I would not be asking now ...Will go now read docs, thanks for hints and tips, wysota...
Qt 5.3 Opensource & Creator 3.1.2
I told you the names of fields in Designer. I think I can expect someone with at least two years of experience to locate them there.
Yes, wysota, do not be mad, please, you are right, but I haven't slept whole weekend because of this application. And I do not use designer, since I want to master qt by handcoding and then switch to designer ....
Qt 5.3 Opensource & Creator 3.1.2
So now you see this was not a good idea. A tired man (programmers included) has a very reduced efficiency. A very tired man has no efficiency at all. Go to sleep.
Those same names are available in Qt Assistant.And I do not use designer,
Bad idea.since I want to master qt by handcoding and then switch to designer ....
MarkoSan (14th April 2008)
Well, ok, now I've set up all things as they should be. I've subclassed QTableView and QAbstractTableModel. It works fine for now. Just question. I've followed wysota's advice and the method data() return QVariant, which is QString stuffed with the values of all components of my struct. Wysota, did I do it right way or not?
Qt 5.3 Opensource & Creator 3.1.2
No, I told you to use different roles for different data pieces.
Ok, then back to docs ... But I do not get this roles. I've looked them up in docs, the roles are used for editing, rendering data ... not for data type itself ...
Qt 5.3 Opensource & Creator 3.1.2
I see different pieces of data here, don't you?The point is that every row consists of two lines, the upper one will hold merchandize name (solo column) and the lower one will consists of following fields in order:
* price/merchandize unit (eur formatted, including euro sign
* number of merchandize unit (formatted with leading 0)
* price/unit*number of merchandize units (eur formatted, including euro sign)
* at the end there will be total field
So, quote fomr the docs:So, for this each data from struct I need a whole familiy of this roles (numbers)?!Each item in the model has a set of data elements associated with it, each with its own role. The roles are used by the view to indicate to the model which type of data it needs.
Qt 5.3 Opensource & Creator 3.1.2
Bookmarks