Search Results

Search found 4 results on 1 pages for 'liak'.

Page 1/1 | 1 

  • SetBackground and setForeGround not working in QTableWidgetItem

    - by liaK
    Hi I am using QTableWidget and QTableWidgetItem to populate QTableWidget. When i try to set the background and foreground for QTableWidgetItem, it's not displaying the set background and foreground colors. I am using Qt4.4 . My code looks like this lcurrentTableWidgetItem-setForeground(Qt::blue); lcurrentTableWidgetItem-setBackground(Qt::gray); Someone can help me with this.

    Read the article

  • Table and Image in a single page of QTextDocument in Qt4

    - by liaK
    Hi, I want to display a table and a image side by side. i.e Left side the image and right side the table. I want this because the image is the reference image for the data present in the table. I want that output in pdf. So I am using QTextDocument, QTextCursor and QPrinter to get the output in pdf. So how it is possible to display the image and table in QtextDocument i.e within a single page of the pdf? I am using Qt 4.5.3 and Windows Xp. Any pointers regarding this are welcome.

    Read the article

  • Number of characters recommended for a statement

    - by liaK
    Hi, I have been using Qt 4.5 and so do C++. I have been told that it's a standard practice to maintain the length of each statement in the application to 80 characters. Even in Qt creator we can make a right border visible so that we can know whether we are crossing the 80 characters limit. But my question is, Is it really a standard being followed? Because in my application, I use indenting and all, so it's quite common that I cross the boundary. Other cases include, there might be a error statement which will be a bit explanatory one and which is in an inner block of code, so it too will cross the boundary. Usually my variable names look bit lengthier so as to make the names meaningful. When I call the functions of the variable names, again I will cross. Function names will not be in fewer characters either. I agree a horizontal scroll bar shows up and it's quite annoying to move back and forth. So, for function calls including multiple arguments, when the boundary is reached I will make the forth coming arguments in the new line. But besides that, for a single statement (for e.g a very long error message which is in double quotes " " or like longfun1()->longfun2()->...) if I use an \ and split into multiple lines, the readability becomes very poor. So is it a good practice to have those statement length restrictions? If this restriction in statement has to be followed? I don't think it depends on a specific language anyway. I added C++ and Qt tags since if it might. Any pointers regarding this are welcome.

    Read the article

  • Declaration of struct variables in other class when obtained by getters

    - by liaK
    Hi, I am using Qt 4.5 so do C++. I have a class like this class CClass1 { private: struct stModelDetails { QString name; QString code; ..... // only variables and no functions over here }; QList<stModelDetails> m_ModelDetailsList; public: QList<stModelDetails> getModelDetailsList(); ... }; In this I have functions that will populate the m_ModelDetailsList; I have another class say CClassStructureUsage, where I will call the getModelDetailsList() function. Now my need is that I have to traverse the QList and obtain the name, code from each of the stModelDetails. Now the problem is even the CClass1's header file is included it is not able to identify the type of stModelDetails in CClassStructureUsage. When I get the structure list by QList<stModelDetails> ModelList = obj->getModelInformationList(); it says stModelDetails : undeclared identifier. How I can able to fetch the values from the structure? Am I doing anything wrong over here?

    Read the article

1