Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.7k Topics 458.0k Posts
  • How to get mousePressEvent by parent widget?

    3
    0 Votes
    3 Posts
    5k Views
    J
    Thank you very much! Your suggestion is very helpful. And I should reconsider my approach. I want to move QCommnadLinkButton by drag. But I should define the change of location in subclass inherited from QCommnadLinkButton, shouldn't you? I will try and apologize for my poor skill.
  • Qt 4.7 Gtk theme issues

    9
    0 Votes
    9 Posts
    6k Views
    J
    Thanks for the notification. Disregard the bugreport above since it seems to be unrelated to this issue. The build servers for the SDK had to be upgraded to a new version and a few dependencies required for GTK support were unfortunately lost in the process. We will rebuild and update the packages very soon as neither Qt itself or the SDK should be affected. The standalone builds of creator seems to work fine.
  • [Solved]Hide a tab widget from QTabWidget

    6
    0 Votes
    6 Posts
    15k Views
    ?
    cool :)
  • Comparing unicode chars

    4
    0 Votes
    4 Posts
    4k Views
    T
    Are you aware that 'ä' can be encoded in different ways in unicode? Your simple comparison only detects one way to encode it! You might want to normalize (see "QString::normalized":http://doc.qt.nokia.com/4.7/qstring.html#normalized) both strings before comparing them or be prepared to have strings that produce the same sequence of glyphs (the little drawings on the screen) be considered different. Some normalization forms encode 'ä' in a sequence of unicode codepoints. In that case your character-by-character comparison will miss it.
  • QAxObject->dynamicCall() throws Type Mismatch (Solved)

    1
    0 Votes
    1 Posts
    6k Views
    No one has replied
  • How to be notified when a row is hovered in a QFormLayout?

    6
    0 Votes
    6 Posts
    4k Views
    D
    [quote author="mario" date="1285568589"]Another solution could be to use QTreeWidget/QTableWidget, maybe?[/quote] Yeah, maybe. Delegates will help author.
  • [Solved] Strange Qt Creator text search behaviour

    4
    0 Votes
    4 Posts
    3k Views
    ?
    good to hear that :)
  • 0 Votes
    3 Posts
    7k Views
    Q
    That fixed it! Thanks for the tip.
  • How to use QGLPixelBuffer or QGLFramebufferObject in QGraphicsItem paint

    3
    0 Votes
    3 Posts
    4k Views
    A
    Thanks for your referance, so we just ignore the pxPainter in the parameters and paint ourselves. Another issue is how to handle the zOrder of the GraphicsItems, or some composition of images. I'v tried bindTexture to the QGLFramebufferObject, seems not work.
  • Const string& in QScript (Qt 4.6)

    2
    0 Votes
    2 Posts
    3k Views
    F
    If I remember correctly, you have to include the namespace in the metatype declaration: @Q_DECLARE_METATYPE(std::string)@ But why not use QString and QString::toStdString() when needed?
  • Updating a QGraphicsTextItem

    4
    0 Votes
    4 Posts
    5k Views
    ?
    If you use setPlainText(), the whole QTextItem will get cleared and all previous undo/redo info is lost, so the cursor moves to 0 position. If you use movePostion or setPosition, the cursor doesn't seem to move. So why not use insertText() and then use your logic to repaginate. I tried a quick example and this works.
  • QDebug output in dos Shell

    22
    0 Votes
    22 Posts
    11k Views
    Q
    Solved, was a lib inserted from my team, qtestlib, I've removed all dependencies into my project and now it disappears. Thanks a lot.
  • Problem linking a foreign static library

    4
    0 Votes
    4 Posts
    13k Views
    G
    This has been resolved. There were two issues. First, I had an error in the include path that pointed to the wrong vtkConfigure.h, which had #define VTK_BUILD_SHARED_LIBS in it (this needed to be commented out). This prevented the mangled symbol names from being translated into C++ function references. Second, I had failed to realize that in the case of static libraries, it is necessary to explicitly link all the supporting libraries as well (about 20 of them!). It's all working now.
  • Why QGLFramebufferObject in QGraphicsItem don’t work?

    2
    0 Votes
    2 Posts
    4k Views
    S
    good news, i've found a way to rendering a correct fbo to the quad in the scene. it was dependend of the order of the painter->beginNativePainting(); line. i changed the order, that the painter->beginNativePainting(); is before the QGLContext and QGLFramebufferobject is init. the message is still active but the result is correct. source @ painter->beginNativePainting(); // ------------ FBO begin ------------ context = new QGLContext(QGLFormat(QGL::SampleBuffers | QGL::DoubleBuffer | QGL::AlphaChannel), widget); context->create(); // !!! context->makeCurrent(); fbo = new QGLFramebufferObject(512, 512); // GLWidget::GLWidget (constructor) fbo->bind(); { ... } fbo->release(); @ Output !http://www.czepa.net/output2.jpg(Output Image)!
  • Cannot generate .so file for application deployment on linux us

    8
    0 Votes
    8 Posts
    8k Views
    A
    Hey phamtv, [quote author="phamtv" date="1285252252"]I forgot to answer one of your question. No, I do not have the IIRC compiler. I searched for "IIRC" in the Qt directory that resulted in no findings.[/quote] IIRC = "If i remember correctly" =) [quote author="phamtv" date="1285255512"] Does this mean that in order for me to run an application on Window's, it needs to be built on a Window's machine with Qt on it and if I wanted it to run the same application on an X11 machine, I would have to rebuild the same application on an X11 machine? [/quote] No exactly. The thing you seem to not get is that each operating system use a different binary format for executable files and shared libraries. So, .exe file will not run on Linux, an ELF file won't run on Windows. However, you can generate a binary to run in other OS, it's a matter of setting a proper compiler to do this task. In you case, you need a Windows compiler that knows how to build Linux binaries/libs. [quote author="phamtv" date="1285255512"] Is there a "simple" way to integrate a linux compiler on a Window's machine so that I can build the application "targeted" for a Linux machine on Window's? [/quote] I already tried the opposite way: Using a compiler running on Linux to build Windows binaries, I think you can easily find a guide of how to do it on the web. Ah, remember: It is not a Qt specific thing. Using a 'cross-compiler' to build a binary to another OS is framework independent. It can work for pure C applications, for instance.
  • Widget construction

    6
    0 Votes
    6 Posts
    4k Views
    S
    Meanwhile bought a helpful book. I understand now that the Mainwindow calls "delete" for all child elements, which is a second cause why child elements must be created on the heap. My program possibly crashed whenever I closed the main windows but I did not notice it because I did not execute it from a shell window.
  • [Solved] QGraphicsPixmapItem && QGraphicsGridLayout

    9
    0 Votes
    9 Posts
    8k Views
    L
    Thanks for your help!
  • QUdpSocket::setProxy crash

    5
    0 Votes
    5 Posts
    3k Views
    S
    Here: "http://bugreports.qt.nokia.com/browse/QTBUG-13790":http://bugreports.qt.nokia.com/browse/QTBUG-13790 Sorry, i just log out ....
  • "Open file" dialog in Qt

    3
    0 Votes
    3 Posts
    66k Views
    A
    @QString fileName = QFileDialog::getOpenFileName(this, tr("Open File"), "", tr("Files (.)"));@ this static function calls the native file dialog.
  • QTcpSocket states on Windows and Linux

    1
    0 Votes
    1 Posts
    4k Views
    No one has replied