Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.5k Topics 457.3k Posts
  • Qt3D - Change near clipping

    1
    0 Votes
    1 Posts
    1k Views
    No one has replied
  • QDockWidget: dock area

    1
    0 Votes
    1 Posts
    984 Views
    No one has replied
  • QTcpSocket never triggering readyRead()

    2
    0 Votes
    2 Posts
    5k Views
    C
    There is insufficient information to tell us why this is failing. Here are some observations and questions to ask yourself. You don't need to explicitly call open() on the QTcpSocket, that will be done by the connectToHost() call. The flush() on line 7 has no purpose. Is the specified host listening on that interface and port? Is an error reported? Does your write() call return the expected number of bytes? Are warning message visible in the program console/debug output? Have you verified that the server receives the bytes? Have you verified that the server sends a response? Even if you received a readyRead() signal you have not heeded the warning in the docs regarding checking that there are sufficient bytes available before using the streaming operator. The entire response may not arrive in a single chunk. This code may still not function.
  • QMdiSubWindow Not Obeying Child Size.

    1
    0 Votes
    1 Posts
    1k Views
    No one has replied
  • QTableView sort by ALL Column,not by single Column

    4
    0 Votes
    4 Posts
    3k Views
    N
    listview is not for my application, I use some tableview features,such as: setColumnWidth setRowHeight setGridStyle and itemDelegate and customlize tablemodel And I found the link above is sort multiple columns but not multiple columns as one list and subclass QSortFilterProxy to achive is very difficulty for such sort policy so at last, I manage to sort my Model Data myself,and reset the tableview.
  • QGraphicsTextItem - variable character spacing

    1
    0 Votes
    1 Posts
    1k Views
    No one has replied
  • How to get CharFormat from each char

    3
    0 Votes
    3 Posts
    2k Views
    A
    This might get you what you are looking for. @QTextCursor cur(TextEdit->document()); QTextCharFormat charformat; for (int i = 1; i <= TextEdit->length(); i++) { cur.setPosition(i); charformat = cur.charFormat(); } @ The setPosition method doesn't state what index it starts from but I think index 0 would be before the first character in your document and index = length() would be right after the last character.
  • Linking Custom Libraries on Windows 7

    1
    0 Votes
    1 Posts
    1k Views
    No one has replied
  • QCheckBoxes

    8
    0 Votes
    8 Posts
    3k Views
    A
    Boy, it sure sounds I should be glad I don't have to use your application... Anyway, best of luck!
  • Problems on Mousemove event on Graphicsview and QTabWidget

    2
    0 Votes
    2 Posts
    3k Views
    E
    I solved my problem by making an signal on graphicsview, so i can emit signal on mousemove() of graphicview and update display on Lcdnumber
  • External TouchPad for Qt / Qt Quick

    1
    0 Votes
    1 Posts
    1k Views
    No one has replied
  • Converting qint8 to string

    17
    0 Votes
    17 Posts
    12k Views
    N
    sorry I sent the wrong code.but it might be something like that. there i put the packet size at the beginning of the packet to be sent.i think you just need to put there what you want to send. Sorry for mistakes i'm newbie
  • Using a palette to set the color of a labels text in QtDesigner

    17
    0 Votes
    17 Posts
    12k Views
    A
    Now, that is a Qt Creator issue :-) I guess it is because the labels of the checkboxes behave the same anyway?
  • QAction Disabled in a Toolbar can not be Checked?

    2
    0 Votes
    2 Posts
    1k Views
    A
    It is actually shown as both checked and disabled, but the only difference is that the contents of the button has been slightly shifted. That is too subtle to notice. There are two ways around it, and both have disadvantages: create a proxy style to render the button differently in this case. use a style sheet do define your own styling.
  • [Solved] Template Function Fails to Compile

    3
    0 Votes
    3 Posts
    3k Views
    E
    Thanks for clearing that up. It makes sense now, and I can stop banging my head against the wall. The code you posted also works perfectly.
  • [SOLVED] Segmentation Fault with QProcess, but in console works all fine

    9
    0 Votes
    9 Posts
    8k Views
    A
    Memory leak still exists)) try to change to: @ proc = new QProcess(this); @ Did you run your app in debug mode (e.g. via F5 shortcut)?
  • [Closed] Qabstractitemview

    Locked
    2
    0 Votes
    2 Posts
    1k Views
    A
    You've just "asked":/forums/viewthread/18811/ this question, and was given some pointers with older content on this very topic. Closing.
  • One letter string into char and then bit-wise comparing

    6
    0 Votes
    6 Posts
    3k Views
    R
    thanks, that helped a lot!
  • Qtableview

    5
    0 Votes
    5 Posts
    2k Views
    V
    thank you for your reply
  • [Solved]How to calculate the border-width of a widget in the paintEvent?

    2
    0 Votes
    2 Posts
    5k Views
    S
    After working on this for few hrs i figured out that QWidget does not provide any information about the border-width. So instead of using QWidget i use QFrame. My requirement was to paint in the available area excluding the border for a widget. This is achieved by using QFrame that provide "frameWidth()":http://doc.qt.nokia.com/4.7-snapshot/qframe.html#frameWidth-prop and "contentsRect()":http:// for the same purpose. Thanks.