Yes this is a subclass of QTextEdit. I do see that I have to do all the blinky cursor stuff myself. QPlainTextEdit has a really nice convenience function called getPaintContext that handles the state of the cursor for you, wish they had the same call in QTextEdit. oh well.
I think you know that the setToolButtonStyle() can only set the icon position wrt the text. e.g. the "folder" icon for the File->Open ... not to be confused with menu arrow position.
From what I've seen, I don't think by default you can set the menu arrow position to a different location using stylesheet. Check this "faq":http://developer.qt.nokia.com/faq/answer/how_can_i_draw_custom_subcontrols_for_a_complex_control on a similar example on how to draw custom sub controls for a complex control
I have read this documentation - but experimenting with static linking takes a lot of time (i.e. you need to completely rebuild Qt) - and it does not build WebKit when you do configure -static. As I am not sure if it is really doable, I wonder if somebody could try to build it if he already have the configured information.
so would the solution be ...
if the pixmap size is smaller than the current label size, then call setGeometry on the dialog based on the pixmap size?
also if not programatically, then one can use the setSizeGripEnabled on the dialog I think.
Yes, the cmd shell does obviously not support Latin1. I can change the font using the chcp command, but no avaiable font matches Latin1.
But QT supports encoding to the console encoding, which is "IBM 850" in my case. What I need is a method that tells me the current encoding of the console font, so I can set the correct encofing in my program.
It could be possible by either accessing your display driver/framebuffer directly or you can have your customized paint engine.
bq. To render outside of Qt's paint system, e.g., if you require native painting primitives, you need to reimplement QWidget::paintEngine().
Unless you mean a tool bar or the status bar, this is in general not possible since the title bar is outside of Qt's control (it is provided by the window manager).
There may be platform-specific solutions for adding things to the title bar though. At least I've seen applications that appear to do that on Windows and Mac. But you would have to use the platform API for that.
You will need a font for the languages you want to use. If such a font is provided then Qt can render "most of the world's writing systems". This refers to being able to do all the complex arranging of the individual bits and pieces found in the font file correctly.
Do remember that QAction is a QObject and can therefore not be copied. If you want to pass the QAction around, use pointers to the thing.
@myAction[index] = new QAction(tr("HI"), this);@
Of course myAction has to be of the type QAction *.
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.
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.
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.
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.
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.
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.
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.
// ------------ FBO begin ------------
context = new QGLContext(QGLFormat(QGL::SampleBuffers | QGL::DoubleBuffer | QGL::AlphaChannel), widget);
context->create(); // !!!
fbo = new QGLFramebufferObject(512, 512); // GLWidget::GLWidget (constructor)
[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?
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?
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.
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.
Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.