Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.5k Topics 457.3k Posts
  • Using dll library in release, problems.

    9
    0 Votes
    9 Posts
    6k Views
    A
    May be Qt is not hard, but C++(or C++ with Qt) is really hard for me. I have tried to find a bug for a month and I cann't. I see no other way except of redeveloping the program with other toolkit.
  • SetUnhandledExceptionFilter and GCC

    2
    0 Votes
    2 Posts
    3k Views
    L
    Does AddVectoredExceptionHandler() work?
  • Nice2See: QTablewidget fit in Widget

    16
    0 Votes
    16 Posts
    8k Views
    H
    That works fine. Thank you Andre! I have a small question regarding the Mainwindow's width. I would like to adopt the mainwindows width to that table, depending on the numbers size' stored in my tables columns. For instance when I have big numbers in each col, my table might be real wide. So I would like to adopt my mainwindow, such that I dont need any Horizontal scrollbar.. Thank you in advise. Cheers Huck
  • How can create QTreeView with different Objects

    4
    0 Votes
    4 Posts
    4k Views
    A
    Another approach is to create a struct like this: @ struct TreeNode { enum TreeNodeType { Institution, College, Career, Department }; TreeNodeType type; void* object; QList<TreeNode> childNodes; } @ Instead of a void pointer and a type flag (I know, not very type save), you can of course also use other solutions like having a pointer to each of the four different classes in there (and have only one be non-0) or even to have a base TreeNode class, and make four subclasses from it, one for each of the types you need to store. Your index pointer in your QModelIndex will point to the TreeNode class, not to your instances directly. That way, you can be sure what to case your pointer to. Again, an alternative for that is to use a single (flat) list of nodes in the background, and put the index in this list as the item data in your QModelIndex. However you do it: tree models stay hard to get right, and the way QAIM and QModelIndex are constructed does not make it easier to create mixed-type trees.
  • QComboBox in the QTableView

    10
    0 Votes
    10 Posts
    7k Views
    G
    What do you expect us to do with your code? Does it work now or not?
  • QApplication crashes on Constructor

    10
    0 Votes
    10 Posts
    9k Views
    G
    Do you create more than one QApplication object?
  • [Solved] Want to turn syntax highlighting on and off - how?

    4
    0 Votes
    4 Posts
    2k Views
    G
    Cheers - glad it helped you. I've added the snippet as note to the [[Doc:QSyntaxHighlighter]] docs.
  • Create a "Virtual Disk" with Qt

    2
    0 Votes
    2 Posts
    2k Views
    G
    No, there is no such means. You'll have to do that all yourself, sorry.
  • String replace content

    11
    0 Votes
    11 Posts
    3k Views
    EddyE
    [quote author="Alicemirror" date="1316190908"]@Eddy: thank you. It was corret to report ? I am not a puritane, but it seems really bad in this context.[/quote] Yes, well done. They were not Qt related. This was not the only one, so we will keep an eye on it.
  • Custom memory management

    1
    0 Votes
    1 Posts
    2k Views
    No one has replied
  • MultiThreaded GUI application

    5
    0 Votes
    5 Posts
    4k Views
    S
    Ya im confirm about that. Problem is coming when i do PixelBuffer makecurrent(). This is the piece of code whr im getting problem: @ flushData() { pixelBuffer->makeCurrent(); glClearColor(0.5,0.5,0.5,255); glClear(GL_COLOR_BUFFER_BIT); } @ Where pixelBuffer is the QGLPixelBuffer object. And following where im initalizing my QGLWidget: @ setWidget(QWidget* w) { if( QGLPixelBuffer::hasOpenGLPbuffers() ) { QGLWidget* glw = qobject_cast<QGLWidget*>(w); if( glw ) { QGLFormatformat(QGL::Rgba|QGL::AlphaChannel,1);// pixelBuffer = new QGLPixelBuffer(d->size, d->size, format, glw); } else pixmap = new QPixmap(d->size, d->size); } else pixmap = new QPixmap(d->size, d->size); // Now initialize the paint device if(pixelBuffer) { pixelBuffer->makeCurrent(); glViewport(0, 0, d->size, d->size); glClearColor(0.5,0.5,0.5,255); glClear(GL_COLOR_BUFFER_BIT); textureId = pixelBuffer->generateDynamicTexture(); #ifndef Q_WS_X11 pixelBuffer->bindToDynamicTexture(textureId); #else pixelBuffer->updateDynamicTexture(textureId); #endif ((QGLWidget*)(w))->makeCurrent(); dataPaintDevice = pixelBuffer; } @ And one more thing that flushData() function if i call initially then no problem but after when start to read the data from the socket then problem ll rise. Edit: please use @ tags to delimit code blocks to make it more readable [ZapB]
  • Qgraphicsitem clipping

    3
    0 Votes
    3 Posts
    3k Views
    J
    i tried both, with overwriting it and without. neither works
  • Creating a keypress signal from application button

    34
    0 Votes
    34 Posts
    37k Views
    V
    [quote author="maxmotor" date="1316166090"]I just wanted to tell you that my code is now working as intended![/quote] Glad to hear! :) However, I highly recommend you learning C++ - it just save your time in future
  • Qt + 3D Model + Support

    2
    0 Votes
    2 Posts
    3k Views
    kidproquoK
    As far as I'm aware there is currently support for 3ds, obj and partial support for COLLADA-FX. There is also documentation for writing your own scene format plugin "here":http://doc.qt.nokia.com/qt3d-snapshot/sceneformats-obj.html if you're that-way inclined.
  • Extract a zip file

    4
    0 Votes
    4 Posts
    5k Views
    A
    [quote author="Lukas Geyer" date="1316154047"]Take a look at "QuaZip":http://quazip.sourceforge.net/.[/quote] Which is also mentioned in the FAQ entry, just like several other options...
  • QSystemDeviceInfo equivalent for Desktop & Laptops ?

    2
    0 Votes
    2 Posts
    2k Views
    G
    QProcess::systemEnvironment returns the environment variables, not information about the OS and hardware. AFAIK, you can use QtMobility also on the Desktop, can't you? Then you could yust use the same methods...
  • 0 Votes
    11 Posts
    6k Views
    F
    It might just be the fact that you rebuilt a lot of the code after the change. Technically QVector and QList require the same behavior from the stored types.
  • What is the use of the Qt::Desktop window flag?

    2
    0 Votes
    2 Posts
    2k Views
    L
    There is a special widget called "QDesktopWidget":http://doc.qt.nokia.com/latest/qdesktopwidget.html, which allows for accessing screen information on multi-head systems. You cannot use it directly and you will have to use QApplication::desktop() to retrieve it. The Qt::Desktop flag is (at least as far as I know) used internally only to distinguish the QDesktopWidget from other widgets and is not passed to any window manager.
  • Check if keyboard key is down

    5
    0 Votes
    5 Posts
    9k Views
    M
    Makes sense. Sounds like we need a new class with the static call, QKeyboard::isKeyDown(int key); I noticed there is a gaming forum here, what is being recommended for games since they will need something along these lines?
  • [KNotification] method sendEvent() is not called.

    25
    0 Votes
    25 Posts
    10k Views
    T
    You're welcome!