Thalia

0

votes
0

answer
2

views

How I implement an expandable menu with elements edit text?

I created an activity to edit profile. In this activity, the user has 2 options: edit personal information and edit account information. So, I need to implement an 'expandable' to show the fields to edit according to the option that the user has clicked. How to do it ?, what can I use? Expected resu...
Thɑliɑ Aquino
1

votes
1

answer
53

views

UNIDRV - GPD - Printer Driver - Default landscape orientation

I have a custom printer driver, and I would like the printer to be set to landscape upon installation. *Feature: Orientation { *rcNameID: =ORIENTATION_DISPLAY *DefaultOption: LANDSCAPE_CC270 *Option: PORTRAIT { *rcNameID: =PORTRAIT_DISPLAY } *Option: LANDSCAPE_CC270 { *rcNameID: =LANDSCAPE_DISPLAY }...
Thalia
1

votes
1

answer
1.5k

views

debugging a c++ dll in VS2010, from python

I have a dll built in c++, under VS2010, and I am calling it from a python project. I had an error, inside the dll, and I would have liked to be able to debug using VS tools, step into the solution until I reach the task that 'read an invalid memory location'. The debug / stepping into functions di...
Thalia
1

votes
1

answer
4.1k

views

VB.NET UserControl

I am trying to create a UserControl in VB.net, under VS2010. I have the code for the UserControl and I would like to add it to a form. My problem is that, according to every book and forum I have seen, after I build the UserControl, it should show up in the Toolbox. It doesn't. I even downloaded cod...
Thalia
1

votes
1

answer
673

views

NSIS doesn't backup all files

An NSIS installer creates a fairly large folder structure. When the installer starts, it checks the registry to see if there is a current version installed... Then it asks if you want to make a backup of the current folder. It works most of the time, but sometimes when it is backing up older versi...
Thalia
1

votes
1

answer
420

views

NSIS - file in PLUGINSDIR doesn't execute

Function .onInit InitPluginsDir ; check registry for installed version... Function End Section 'other' OTHER !define SOME_FILE 'file.exe' SetOutPath '$PLUGINSDIR' File /nonfatal '${SOME_FILE}' ExecWait ''$PLUGINSDIR\${SOME_FILE}' /q /norestart' SectionEnd I have replaced TEMP (which I would delete a...
Thalia
1

votes
1

answer
591

views

vb.net find common parent directory

For a list of files, I am trying to determine the common parent directory. The files will not be in the same directory (tested that part)... I am trying Dim myParentDirectory As String = Path.GetDirectoryName(list.Item(0)) Dim myCurrentDirectory As String For Each file in list myCurrentDirectory =...
Thalia
1

votes
1

answer
1.7k

views

'System.Collections.Generic.KeyNotFoundException' at the end of Invoke

I have just learnt how to set up a GUI in a separate thread... Private myGui As SomeGui Public Class myAsyncState Public a As Boolean = True Public b As Integer = 100 End Class Public Sub Caller() ' myGui = New SomeGui() ' setup myGui.Begin() Dim a as Boolean = False Dim b as Integer = 1 Dim state A...
Thalia
1

votes
1

answer
1.2k

views

FillPolygon with holes

I want to create a 'fill' that fills the inside of a polygon, created using a point list, but be able to remove its holes. My old code: Private Sub DrawSomething(ByVal points as List(of Point), _ ByVal myBrush As System.Drawing.Brush, _ ByVal myGraphics As System.Drawing.Graphics) myGraphics.FillPol...
Thalia
1

votes
1

answer
452

views

Qt: Unable to parse certain svg item styles

I am trying to display and modify some svg, I would like to be able to read or modify their color. GraphicsColorSvgItem::GraphicsColorSvgItem(QString svgContent, QGraphicsItem *parent) : QGraphicsSvgItem(parent), _svgXML() { _svgXML.setContent(svgContent); setSharedRenderer(new QSvgRenderer(_svgXML....
Thalia
1

votes
2

answer
291

views

Build errors when iterating through QGraphicsItem items

I have changed my class Item to inherit from QGraphicsItem, and suddenly getting problems... class Item : public QGraphicsItem { Item(); QRectF boundingRect() const; void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget); }; class CollectionView : public QGraphicsView...
Thalia
1

votes
1

answer
250

views

How to continue text editing after formatting changes of QGraphicsTextItem?

I am trying to make changes (font changes) to a QGraphicsTextItem that is editable. I am trying to change formatting of fragments of text, or the formatting applied at typing point (if I set text bold, the text I type after that action at cursor position would be bold). Setting formatting for text f...
Thalia
1

votes
1

answer
792

views

Reading Rich Text Character and Block Formatting

I have rich text items implemented using QGraphicsTextItem To set font size, for example: void set (int fontSize) { QTextCursor _cursor = textCursor(); QTextCharFormat _format; _format.setFontPointSize(fontSize); _cursor.mergeCharFormat(_format); setTextCursor(_cursor); } A lot more complicated is...
Thalia
1

votes
1

answer
352

views

QGraphicsItemGroup moves during transformations

I have QGraphicsItems on a QGraphicsScene. I need to group them. The main reason for grouping: I need to provide a way to apply transformations on a group. It is all very simple if I need to apply a single transformation, and the items bounding rectangle top-left is at 0,0. I have seen how grouping...
Thalia
1

votes
1

answer
708

views

Apply QGraphicsColorizeEffect to a part of a QGraphicsSvgItem (only to the svg itself)

I have a QGraphicsSvgItem subclass where I would like to modify the svg color. I want to use for that QGraphicsColorizeEffect, and it works great. My items also have a custom selection rectangle, highlighted - similar to other item types. When I apply the colorize effect, the highlight also turns to...
Thalia
1

votes
1

answer
958

views

Saving a QGraphicsScene to Svg changes scaling

I need to save the items from my QGraphicsScene to an svg, and be able to load that svg back on the scene. I can do it... But each time the canvas is saved to svg, upon load the items are somewhat bigger (and repeatedly saving and loading the same svg causes it to grow). I can't find the cause. I am...
Thalia
1

votes
1

answer
493

views

Combine multiple mono QImage into a color QImage

For a list of colors, I have a corresponding list of QImage, format mono. The mono images have been processed in such a way that a single pixel can be black from all images. I would like to merge them into a color image. I had 3 ideas. 1. Use image composition modes. I was unable to get it to work....
Thalia
1

votes
1

answer
564

views

Applying QTransform on QPainter - how to find translations

I would like to apply certain transformations on a QImage - and because of performance restrictions, I would like to apply these transformations at the time of rendering if possible. The transformations I need - rotating 90, 180, 270 degrees, and vertical mirror. I am rendering a QGraphicsScene to a...
Thalia
1

votes
1

answer
74

views

Regular expressions returning empty strings

I need help making some string replacements, with regular expressions. The task: scale the fonts in a generated html string. I am using Qt, must work in Qt 4.8. I have determined some regular expression to separate the section containing the font sizes, and tested it (https://regex101.com/r/Y0W13N/1...
Thalia
1

votes
1

answer
283

views

Create a 2-line (not wrap) QPushButton

I must create a QPushButton that contains an icon and 2 lines of text. Ideally I should be able to put the icon either on the left side (on one design) or in the center, above the text (for another design in another view). The 2 lines of text I need to be able to set separately (and even with differ...
Thalia
1

votes
2

answer
0

views

How to enter input data from an Excel to a Selenium project?

I would like your support by providing information (scripts, videos, or books) regarding how to enter input data (for example: username and password) to a selenium project from an Excel file using Cucumber and Serenity DB. Is it possible? Thanks for all.
Thalia Depaz
1

votes
1

answer
4.5k

views

environment variable as partial path in app.config

I have an environment variable that points to a folder where development code is located. On my machine it is C:\SOME_NAME\CODE. This environment variable is referenced in code, as other computers using the same code have a different path for the same environment variable. I cannot be sure of direct...
Thalia
1

votes
1

answer
737

views

Drag-and-drop from my program to third-party program in vb.net

I am trying to open multiple files using a third-party program, by calling it from VB.NET. By default, the program I am using, through command line, only opens one file at a time - and if I call it again, it opens a new instance. (when started in GUI, I can drop many files on it). Now I open it wit...
Thalia
1

votes
1

answer
2.1k

views

Error when running envdte project from console application

I am trying to make work some code I created in an add-in, from console. I am getting errors: Error in solution file: C:\x\x.sln System.Runtime.InteropServices.COMException (0x80010001): Call was rejected by callee. (Exception from HRESULT: 0x80010001 (RPC_E_CALL_REJECTED)) at EnvDTE.Project.get_Kin...
Thalia
1

votes
2

answer
1.8k

views

Where do I create preprocessor directives for a dll export?

I am creating a c++ dll to be imported in vb.net. I have found that the best way to organize the imports and exports in the header file of the dll, is something of the following type: #ifndef MY_DLL_EXPORTS #define MY_DLL_EXPORT __declspec(dllexport) #else #define MY_DLL_EXPORT __declspec(dllimport)...
Thalia
1

votes
1

answer
68

views

Build libraries in linux and mac

I am building a Qt project under windows, linux, mac os Since the project has lib dependencies, I have put the required libs for each platform, like: win32:LIBS += lib1 unix:LIBS += lib2 mac:LIBS += lib3 The problem - if I build on mac, it looks for both unix and mac libs If the unix lib is there I...
Thalia
1

votes
1

answer
932

views

How to separate several inputs on a jtextfield

I am doing a Wage Calculator that will calculate a worker's salary according to their position as the boss, commission worker and such but i need it to accept 5 inputs each textfield for the First name, Last name, and salary. How do i seperate each inputs from each textfields? Example : First Name:...
thalia delmoro
1

votes
1

answer
1.7k

views

Shift `QGraphicsTextItem` position relative to the center of the text?

I have a number of classes that inherit from QGraphicsItem, that get to be arranged in a certain way. For simplicity of calculations, I made the scenes, and items, centered in (0, 0) (with the boundingRect() having +/- coordinates). QGraphicsTextItem subclass defies me, its pos() is relative to top...
Thalia
1

votes
1

answer
1.1k

views

Cleaning up QList and QGraphicsScene to avoid memory leaks

I want to be thorough and clean up to avoid memory and object leaks. I had the misunderstanding that Qt cleans automatically objects that go out of scope, except pointers need to be deleted manually. In my code I have a number of QList... example: void someFunction() { QList x = QList()
Thalia
1

votes
1

answer
210

views

Adding calls inside QgraphicsRectItem subclass triggers infinite redraw

I have a hierarchy of object types, inheriting from a custom interface and QGraphicsItem. In hope of optimizing the code, I would like to inherit from QGraphicsSomethingItem. Example: rectangle class RectangleItem : public Item, public QGraphicsItem { RectangleItem() : Item() // Item initializes m_...
Thalia
1

votes
1

answer
3.3k

views

How to rotate selected QGraphicsItems around the selection center?

I would like to implement rotation of selected items. I have noticed that there are 2 functions - rotate() which performs an immediate action but does not save the rotation on the item - and setRotation(), which stores rotation() (though it requires a repaint causing event). If I select a single ite...
Thalia
1

votes
1

answer
1.2k

views

Set renderer of QGraphicsSvgItem on preprocessed svg xml document very slow

I am using QGraphicsSvgItem subclass, that reads some content from a file, places content into a QDomDocument, does some initial processing, then sets the processed DOM onto a renderer. During program processing, additional changes are required on a copy of pre-processed DOM, so the DOM is stored i...
Thalia
1

votes
2

answer
161

views

How can I hide the caret when not in edit mode?

I have a TextItem inheriting QGraphicsTextItem. I made it so that on double-click I can edit the text, and when clicking out, the text is no longer editable. void TextItem::mouseDoubleClickEvent(QGraphicsSceneMouseEvent * event) { setTextInteractionFlags(Qt::TextEditorInteraction); setFocus(); int...
Thalia
1

votes
1

answer
215

views

QGraphicsPixmapItem is one pixel too large if I set the item selectable

My QGraphicsPixmapItem has to report a correct size - its initial size should match the original image size. I notice something odd if I make the item selectable: the size reported is one pixel too large. Is this to be expected ? Will this behavior be consistent for all QGraphicsPixmapItems that are...
Thalia
1

votes
2

answer
5.5k

views

Trying to add command-line argument execution to NSIS installer

I am trying to customize the NSIS installer. Based on an option from the user, I would like the program to run with a different option, which I would set up with a command line option. (I save some files that I delete at the end, and if the user doesn't want to proceed with the install, then I want...
Thalia
1

votes
1

answer
660

views

c++ Runtime Library Options

What is the meaning of Runtime Library /MTd /MT and so on ? Reading http://msdn.microsoft.com/en-us/library/2kzt1wy3(v=vs.71).aspx, didn't convince me. I have to use a third-party project, that has all its 'Release' as '/MD' and all its 'Debug' as '/MDd'. All my projects (that other people use, so...
Thalia
1

votes
1

answer
5k

views

Channel order in OpenCV

I have been reading in a few forums that OpenCV has the BGR channel order by default. It is also possible that a cv::Mat may have RGB channel order. A gray conversion would specify CV_BGR2GRAY or CV_RGB2GRAY as a parameter. 1) Are there any other options, than RGB and BGR ? 2) Is there any way to fi...
Thalia
1

votes
3

answer
1.2k

views

Linker error - linking two “application” type projects in order to use Google Test

I am trying to test a function with Google Test. It seems that everything is set up correctly, and it builds and executes fine without gtest... (There is a bit of complexity in the code, so I cannot list all the source files here, but without adding gtest, the files are linking properly, and running...
Thalia
1

votes
2

answer
66

views

Optimization and testability at the same time - how to break up code into smaller units

I am trying to break up a long 'main' program in order to be able to modify it, and also perhaps to unit-test it. It uses some huge data, so I hesitate: What is best: to have function calls, with possibly extremely large (memory-wise) data being passed, (a) by value, or (b) by reference (by extrem...
Thalia
1

votes
1

answer
475

views

Inheriting from OpenCV class - compiling error

i need to inherit from an openCV class. The purpose - adding a custom metric. #include 'opencv2/core/core.hpp' #include 'opencv2/features2d/features2d.hpp' class SomeChild : public BFMatcher { public: SomeChild(int _normType, bool _crossCheck); ~SomeChild(); void knnMatchImpl( const Mat& queryDescri...
Thalia

View additional