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.
AFAIK there is no Qt-API to get to those IDs. You will need OS specific code to do that (for all OSes you want to support). You might even end up with vendor specific code to get the BIOS data... but I am not 100% sure there.
Qt implements its painter interface using OpenGL, which is slightly different to when you actually use the gl* commands yourself then you are talking directly to whatwever gl implementation there is on your machine.
It is possible to set up qt to use OpenGL to draw its entire interface (using the -opengl command line flag, among other methods), so when a QPainter is opened on a widget and draws lines etc, it is then itself using the Qt OpenGL API.
Hope that helps?
[quote author="chetankjain" date="1281140654"]when I tried, all machines were on the same subnet and using the same dhcp server for all network configuration, so some other issue[/quote]
This isn't firewall settings. Your firewall (such default windows firewall) might be blocking UDP traffic. If you using other OSes check their firewall settings
[quote author="filipv" date="1284636041"]I want to add an different image to each of the tabs of my tab widget. I could do the setting of an image using style sheets :
But this applies to all tabs. How do I select each tab of a tabbar separately?[/quote]
Your original question was it to set background image to each tab page or is it to set individual icons for each tab page?
[quote author="TwoGunBerg" date="1284555514"]How do add two widgets to the same position when you are using a QVBoxlayout? doesn't a QVBoxlayout by nature put each widget added at a different position?
You can set the second one as the child of the first anytime. This code shows how to do it.. would that solve your problem?
QVBoxLayout *vboxlayout = new QVBoxLayout;
// lbl occupies whole frame
QLabel *lbl = new QLabel("Picture Label!");
// lbltop is the child of lbl
QLabel *lbltop = new QLabel("Picture Info Label!", lbl);
qDebug() << "Picture Label: " << lbl->rect() << ", " << lbl->size();
qDebug() << "Picture Info Label: " << lbltop->pos();
Thanks for this tip. That could become a problem for me too... Up till now, I was developing on a Linux host. But the final target of the software is an embedded device. So, it might be a good idea to continue looking for another solution...
Anyone any other ideas ?
im not sure, but wasnt there a limitation of 4 applications on windows starter? perhaps it thinks the filedialog is a Application by itself and stops it?
As said, only a suggestion I'm not sure if its really the problem
ShapeShifter: Nobody minds you asking basic C++ questions. I (and others) even took the time to answer them, even though those questions are covered by any introduction text to C++, some of which were even recommended here. We provided way more interaction here as you had in the other forum thread you mentioned (which did provide an answer which I found genuinely helpful by the way).
I am new to this whole forum thing (which I am doing almost exclusively in my spare time, I am not paid to answer questions here!) and this forum is new, too. So I am seriously interested in understanding your expectations.
Not sure if there is a bug already for this at "http://bugreports.qt.nokia.com":http://bugreports.qt.nokia.com, probably you could add one
also another solution, you can check if "this":http://developer.qt.nokia.com/forums/viewthread/292/ works