Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.6k Topics 457.6k Posts
  • Problem in setting image with stylesheet?

    2
    0 Votes
    2 Posts
    1k Views
    G
    style sheets are always forwarded to child widgets. and you define it for QWidget which means for all widget classes. Give your widget a dedicated name and use those in the style sheet.
  • Qt/3d model save / export

    3
    0 Votes
    3 Posts
    3k Views
    N
    Thanks for the great links, I guess the example of the file converter might not be totally appropriate for what I want. I really want to be able to create geometry in my code and save/export it to obj format, or some other format that could be opened by a Blender or Maya. The third link seems helpful to that end, but it looks like there are no built in export facilities.
  • Problems with QSQLite

    23
    0 Votes
    23 Posts
    9k Views
    B
    Man, I have asked for help about MYSQL driver about 1 month ago(I am using qt static and want to obtain a lib not a dll). I have compiled and recompiled that small sqldriver project about 100 times:) Finally I got it, and released just an .exe with all QT features :)) I am glad you have managed to build a sqldriver on you own and hope that in future you will share your adventures :P
  • Problem with Threading

    15
    0 Votes
    15 Posts
    6k Views
    S
    Thanks a lot Volker, Asperamanca & KA51O
  • Loading files into drawBackground(QPainter *painter, const QRectF &)

    2
    0 Votes
    2 Posts
    2k Views
    B
    Hm...maybe i've asked too much. Maybe I should specify it more. My first question would be why it is a problem to define the modelfunctions in glwidget? GLWidget's content is the same as the model-class content plus some extras. Therefore I dont understand the error: “It is not safe to use pixmaps outside the GUI thread” Because in the OpenGLScene-Class I have nothing changed except the datatype-names. I've replaced Model-datatype to GLWidget-datatype. Maybe someone would be able to help me? Or is it so obvious that it is to easy to answer. If so I would be happy if you could share your ideas with me. Thank you
  • QGraphicsScene + subtract and move

    3
    0 Votes
    3 Posts
    2k Views
    J
    Yes it is. You basically already told the solution. Detect selected area, Copy everything in that are into new QGraphicsPixmap item, Fill the original with white, transparent or whatever you want, And display the new one as seperate item. Hope it helps, Regards, Jake
  • QHostInfo

    4
    0 Votes
    4 Posts
    7k Views
    L
    Every class in Qt belongs to a "module":http://developer.qt.nokia.com/doc/qt-4.8/modules.html, for "QHostInfo":http://developer.qt.nokia.com/doc/qt-4.8/qhostinfo.html this is "QtNetwork":http://developer.qt.nokia.com/doc/qt-4.8/qtnetwork.html, whose documentation states: [quote]To link against the module, add this line to your qmake .pro file: <code>QT += network</code>[/quote]
  • Using QML with Qt 4.5 SDK

    4
    0 Votes
    4 Posts
    2k Views
    C
    Thanks Volker, I had actually already tried that and that was what was creating the error. Which to Sierdzio's point, is why I had a feeling it would only work with QT 4.7.0. forward. I had actually read a thread somewhere that indicated that it was possible to use QML with QT 4.5 but it did not give an explanation on how it was done which is why I decided to ask here.
  • [Solved] Memory freed but stays reserved... why?

    13
    0 Votes
    13 Posts
    9k Views
    deisikD
    [quote author="Tobias Hunger" date="1327070801"]Whether using container objects help or hinder depends a lot on the implementation of those objects and your memory management. I'd go and try different memory allocators first before changing my data structures (and that only after taking some measurements to make sure there is indeed a significant amount of memory fragmentation!)[/quote] This is not quite so. Think of it as a choice between sorting algorithms. If your data set is small it does not matter which one you use and it is surely much easier to write a bubble sort than reflect over a heapsort (provided you have none at hand). But if the number of items grows really large (which is the case here as I can guess) you have actually no other option left but to change your sorting routine
  • QGraphicItem -> No antialiasing

    1
    0 Votes
    1 Posts
    1k Views
    No one has replied
  • [solved] QTableWidget -> QScrollTab -> handler resize with StyleSheet

    3
    0 Votes
    3 Posts
    2k Views
    G
    [quote author="BlackJack" date="1327063367"] topic is close[/quote] Please mark the topic as solved, not closed. The latter one is for topics where the comment function is disabled for one reason or another, whereas solved topics are open for additional remarks or questions. Thanks! (I've changed it for this one already, in case you wonder :) )
  • How to let the QLabel display the differenet QPixmap in a for loop?

    4
    0 Votes
    4 Posts
    2k Views
    L
    ... which renders your application quite unusable as well, because there is still no event processing.
  • 0 Votes
    2 Posts
    2k Views
    G
    takeItem and setItem
  • How can we set header for a QListWidget?

    3
    0 Votes
    3 Posts
    10k Views
    P
    [quote author="Gerolf" date="1327055515"]AFAIK, the QListView (which is the base for a QListWidget) does not have a header. You will have to add it on your own by hand, using e.g. a QHeaderView.[/quote] ok i will try that.
  • LibVLC into an opengl QGraphicsScene

    1
    0 Votes
    1 Posts
    2k Views
    No one has replied
  • 0 Votes
    7 Posts
    6k Views
    G
    Nice trick! Thank's for sharing!
  • OSX: Qt Creator 4.8

    15
    0 Votes
    15 Posts
    10k Views
    T
    Build->Run Qmake or Build->Rebuild Project X or Build->Clean Project X followed by a normal build should all trigger qmake to be rerun.
  • How to add null character at end in QString.

    3
    0 Votes
    3 Posts
    5k Views
    L
    Every method, that allows for gaining access to the raw data of QString, like QString::data() or QString::unicode(), automatically terminates the string with '\0'. This isn't coincidentally related to "http://developer.qt.nokia.com/forums/viewthread/13631/":http://developer.qt.nokia.com/forums/viewthread/13631/, is it? If so, it would be actually useful to see how you pass the data around and how you convert them from QString to the native types.
  • How to send variable from Dialog class to main window class?

    3
    0 Votes
    3 Posts
    2k Views
    A
    [quote author="Tobias Hunger" date="1326984629"]How about moving your table widget from the dialog into the mainwindow? You should not need to send signals to get the table widget updated.[/quote] Thank u for your reply..
  • Problem with sockets

    2
    0 Votes
    2 Posts
    2k Views
    P
    I had similar task but my data was not only string but also binary so I wrote code for transmitting data using QTcpSocket::write() and QTcpSocket::readAll(). The data itself was QByteArray with some other types stored in it with QDataStream. Since this way seems redundant for your task could you provide minimal working example?